/[escript]/trunk/finley/src/CPPAdapter/FinleyError.cpp
ViewVC logotype

Annotation of /trunk/finley/src/CPPAdapter/FinleyError.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3259 - (hide annotations)
Mon Oct 11 01:48:14 2010 UTC (8 years, 11 months ago) by jfenwick
File size: 1327 byte(s)
Merging dudley and scons updates from branches

1 jgs 82
2 ksteube 1312 /*******************************************************
3 ksteube 1811 *
4 jfenwick 2881 * Copyright (c) 2003-2010 by University of Queensland
5 ksteube 1811 * Earth Systems Science Computational Center (ESSCC)
6     * http://www.uq.edu.au/esscc
7     *
8     * Primary Business: Queensland, Australia
9     * Licensed under the Open Software License version 3.0
10     * http://www.opensource.org/licenses/osl-3.0.php
11     *
12     *******************************************************/
13 ksteube 1312
14 ksteube 1811
15 jfenwick 3259 #ifdef ESYS_MPI
16 ksteube 817 #include <mpi.h>
17     #endif
18 jgs 203 #include "FinleyError.h"
19 gross 727 #include <iostream>
20 jgs 82
21     namespace finley {
22    
23 jgs 150 void setFinleyError(Finley_ErrorCodeType errorCode,
24 jgs 82 const std::string& errMess)
25     {
26 jfenwick 2025 Finley_setError(errorCode,(__const char*)(errMess.c_str()));
27 jgs 82 }
28    
29     void checkFinleyError()
30     {
31 jgs 150 if (Finley_noError()) {
32 jgs 82 return;
33     } else {
34     //
35     // reset the error code to no error otherwise the next call to
36     // this function may resurrect a previous error
37 jgs 150 Finley_resetError();
38     throw FinleyAdapterException(Finley_getErrorMessage());
39 jgs 82 }
40     }
41 jgs 150 void checkPasoError()
42     {
43 jfenwick 3259 if (Esys_noError()) {
44 jgs 150 return;
45     } else {
46     //
47     // reset the error code to no error otherwise the next call to
48     // this function may resurrect a previous error
49 jfenwick 3259 Esys_resetError();
50     throw FinleyAdapterException(Esys_getErrorMessage());
51 jgs 150 }
52     }
53 jgs 82
54     } // end of namespace

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26