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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 82 - (show annotations)
Tue Oct 26 06:53:54 2004 UTC (15 years, 1 month ago) by jgs
File size: 1644 byte(s)
Initial revision

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/setFinleyError.h"
19 }
20
21 namespace finley {
22
23 void setFinleyError(enum Finley_ErrorCodeType errorCode,
24 const std::string& errMess)
25 {
26 char message[errMess.size()+1];
27 strcpy(message,errMess.c_str());
28 setFinleyError(errorCode,message,errMess.size());
29 }
30
31 void checkFinleyError()
32 {
33 if (Finley_ErrorCode==NO_ERROR) {
34 return;
35 } else {
36 //
37 // reset the error code to no error otherwise the next call to
38 // this function may resurrect a previous error
39 Finley_ErrorCode=NO_ERROR;
40 throw FinleyAdapterException(Finley_ErrorMsg);
41 }
42 }
43
44 } // end of namespace

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26