1 |
mmeineke |
153 |
#ifndef __SIMERROR_H__ |
2 |
|
|
#define __SIMERROR_H__ |
3 |
|
|
|
4 |
|
|
#define MAX_SIM_ERROR_MSG_LENGTH 2000 |
5 |
|
|
|
6 |
|
|
struct errorStruct { |
7 |
|
|
char errMsg[MAX_SIM_ERROR_MSG_LENGTH]; |
8 |
|
|
int isFatal; |
9 |
|
|
|
10 |
|
|
#ifdef IS_MPI |
11 |
|
|
int isEventLoop; |
12 |
|
|
#endif // IS_MPI |
13 |
|
|
|
14 |
|
|
} painCave; |
15 |
|
|
|
16 |
|
|
#ifdef __cplusplus |
17 |
|
|
extern "C" { |
18 |
|
|
#endif // __cplusplus |
19 |
|
|
|
20 |
|
|
int simError( void ); // returns 1 if handled. 0 otherwise. |
21 |
|
|
|
22 |
mmeineke |
155 |
void initSimError( void ); // needed to be called from main before anything |
23 |
|
|
// goes wrong. |
24 |
|
|
|
25 |
mmeineke |
153 |
#ifdef IS_MPI |
26 |
|
|
|
27 |
|
|
void checkMPIError( void ); |
28 |
|
|
|
29 |
|
|
#endif // IS_MPI |
30 |
|
|
|
31 |
|
|
#ifdef __cplusplus |
32 |
|
|
} |
33 |
|
|
#endif //__cplusplus |
34 |
|
|
|
35 |
|
|
#endif // __SIMERROR_H__ |