/[escript]/trunk/pasowrap/src/PasoException.cpp
ViewVC logotype

Contents of /trunk/pasowrap/src/PasoException.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4346 - (show annotations)
Tue Apr 2 04:46:45 2013 UTC (6 years, 4 months ago) by jfenwick
File size: 1075 byte(s)
Bringing the changes from doubleplusgood branch.
Can't merge directly because svn doesn't transfer changes to renamed files (mutter grumble).
1
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2013 by University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Open Software License version 3.0
9 * http://www.opensource.org/licenses/osl-3.0.php
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development since 2012 by School of Earth Sciences
13 *
14 *****************************************************************************/
15
16
17 #include "PasoException.h"
18 #include <esysUtils/error.h>
19
20 namespace paso
21 {
22
23 const std::string
24 PasoException::exceptionNameValue("PasoException");
25
26 PASOWRAP_DLL_API
27 const std::string &
28 PasoException::exceptionName() const
29 {
30 return exceptionNameValue;
31 }
32
33 PASOWRAP_DLL_API
34 void checkPasoError()
35 {
36 if (Esys_noError()) {
37 return;
38 } else {
39 //
40 // reset the error code to no error otherwise the next call to
41 // this function may resurrect a previous error
42 Esys_resetError();
43 throw PasoException(Esys_getErrorMessage());
44 }
45 }
46
47 }

  ViewVC Help
Powered by ViewVC 1.1.26