/[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 727 - (show annotations)
Fri May 12 06:31:06 2006 UTC (15 years, 4 months ago) by gross
File size: 1761 byte(s)
In case of an error in paso a seg fault occured. this was caused by
inproper deallocation of memory in this case. this problem is fixed now.


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 "FinleyError.h"
16 #include <iostream>
17
18 namespace finley {
19
20 void setFinleyError(Finley_ErrorCodeType errorCode,
21 const std::string& errMess)
22 {
23 Finley_setError(errorCode,(char*)(errMess.c_str()));
24 }
25
26 void checkFinleyError()
27 {
28 if (Finley_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 Finley_resetError();
35 throw FinleyAdapterException(Finley_getErrorMessage());
36 }
37 }
38 void checkPasoError()
39 {
40 if (Paso_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 Paso_resetError();
47 throw FinleyAdapterException(Paso_getErrorMessage());
48 }
49 }
50
51 } // end of namespace

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26