/[escript]/trunk/dudley/src/CPPAdapter/DudleyError.cpp
ViewVC logotype

Contents of /trunk/dudley/src/CPPAdapter/DudleyError.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3317 - (show annotations)
Thu Oct 28 00:50:41 2010 UTC (8 years, 9 months ago) by caltinay
File size: 1287 byte(s)
Removed bogus mpi.h includes, replaced others by our esysUtils wrapper
and rearranged so that the wrapper always comes before netcdf which fixes
linking problems when disabling mpi on systems with netCDF 4.x.

1
2 /*******************************************************
3 *
4 * Copyright (c) 2003-2010 by University of Queensland
5 * 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
14
15 #include "DudleyError.h"
16 #include <iostream>
17
18 namespace dudley {
19
20 void setDudleyError(Dudley_ErrorCodeType errorCode,
21 const std::string& errMess)
22 {
23 Dudley_setError(errorCode,(__const char*)(errMess.c_str()));
24 }
25
26 void checkDudleyError()
27 {
28 if (Dudley_noError()) {
29 return;
30 } else {
31 //
32 // reset the error code to no error otherwise the next call to
33 // this function may resurrect a previous error
34 Dudley_resetError();
35 throw DudleyAdapterException(Dudley_getErrorMessage());
36 }
37 }
38 void checkPasoError()
39 {
40 if (Esys_noError()) {
41 return;
42 } else {
43 //
44 // reset the error code to no error otherwise the next call to
45 // this function may resurrect a previous error
46 Esys_resetError();
47 throw DudleyAdapterException(Esys_getErrorMessage());
48 }
49 }
50
51 } // end of namespace

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision
svn:mergeinfo /branches/scons_revamp_from_3210/dudley/src/CPPAdapter/DudleyError.cpp:3212-3243

  ViewVC Help
Powered by ViewVC 1.1.26