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 "FinleyAdapterException.h" |
17 |
extern "C" { |
18 |
#include "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 |