/[escript]/release/3.4.2/pasowrap/src/PasoException.cpp
ViewVC logotype

Contents of /release/3.4.2/pasowrap/src/PasoException.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4919 - (show annotations)
Wed Apr 30 06:25:55 2014 UTC (6 years, 1 month ago) by jfenwick
File size: 1143 byte(s)
Because we've got to!

1
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2014 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 2012-2013 by School of Earth Sciences
13 * Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 *
15 *****************************************************************************/
16
17
18 #include "PasoException.h"
19 #include <esysUtils/error.h>
20
21 namespace paso
22 {
23
24 const std::string
25 PasoException::exceptionNameValue("PasoException");
26
27 PASOWRAP_DLL_API
28 const std::string &
29 PasoException::exceptionName() const
30 {
31 return exceptionNameValue;
32 }
33
34 PASOWRAP_DLL_API
35 void checkPasoError()
36 {
37 if (Esys_noError()) {
38 return;
39 } else {
40 //
41 // reset the error code to no error otherwise the next call to
42 // this function may resurrect a previous error
43 Esys_resetError();
44 throw PasoException(Esys_getErrorMessage());
45 }
46 }
47
48 }

  ViewVC Help
Powered by ViewVC 1.1.26