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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 150 - (show annotations)
Thu Sep 15 03:44:45 2005 UTC (14 years, 2 months ago) by jgs
Original Path: trunk/esys2/finley/src/CPPAdapter/FinleyError.cpp
File size: 1863 byte(s)
Merge of development branch dev-02 back to main trunk on 2005-09-15

1 /*
2 ******************************************************************************
3 * *
4 * COPYRIGHT ACcESS 2004 - All Rights Reserved *
5 * *
6 * This software is the property of ACcESS. No part of this code *
7 * may be copied in any form or by any means without the expressed written *
8 * consent of ACcESS. Copying, use or modification of this software *
9 * by any unauthorised person is illegal unless that person has a software *
10 * license agreement with ACcESS. *
11 * *
12 ******************************************************************************
13 */
14
15 #include "finley/CPPAdapter/FinleyError.h"
16 #include "finley/CPPAdapter/FinleyAdapterException.h"
17 extern "C" {
18 #include "finley/finleyC/Finley.h"
19 }
20
21 namespace finley {
22
23 void setFinleyError(Finley_ErrorCodeType errorCode,
24 const std::string& errMess)
25 {
26 Finley_setError(errorCode,(char*)(errMess.c_str()));
27 }
28
29 void checkFinleyError()
30 {
31 if (Finley_noError()) {
32 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 Finley_resetError();
38 throw FinleyAdapterException(Finley_getErrorMessage());
39 }
40 }
41 void checkPasoError()
42 {
43 if (Paso_noError()) {
44 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 Paso_resetError();
50 throw FinleyAdapterException(Paso_getErrorMessage());
51 }
52 }
53
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