| 1 | 
– | 
  | 
| 2 | 
– | 
#ifndef __FORTRAN90 | 
| 1 | 
  | 
#ifndef UTILS_SIMERROR_H | 
| 2 | 
  | 
#define UTILS_SIMERROR_H | 
| 3 | 
  | 
 | 
| 4 | 
  | 
#define MAX_SIM_ERROR_MSG_LENGTH 2000 | 
| 5 | 
  | 
 | 
| 6 | 
< | 
#define OOPSE_ERROR   1 | 
| 7 | 
< | 
#define OOPSE_WARNING 2 | 
| 8 | 
< | 
#define OOPSE_INFO    3 | 
| 6 | 
> | 
#define OPENMD_ERROR   1 | 
| 7 | 
> | 
#define OPENMD_WARNING 2 | 
| 8 | 
> | 
#define OPENMD_INFO    3 | 
| 9 | 
  | 
 | 
| 10 | 
  | 
typedef struct{ | 
| 11 | 
  | 
  char errMsg[MAX_SIM_ERROR_MSG_LENGTH]; | 
| 35 | 
  | 
#endif  | 
| 36 | 
  | 
 | 
| 37 | 
  | 
#endif  | 
| 40 | 
– | 
 | 
| 41 | 
– | 
#else  | 
| 42 | 
– | 
 | 
| 43 | 
– | 
  INTEGER, PARAMETER:: OOPSE_ERROR   = 1 | 
| 44 | 
– | 
  INTEGER, PARAMETER:: OOPSE_WARNING = 2 | 
| 45 | 
– | 
  INTEGER, PARAMETER:: OOPSE_INFO    = 3 | 
| 46 | 
– | 
  INTEGER, PARAMETER:: MAX_SIM_ERROR_MSG_LENGTH = 2000 | 
| 47 | 
– | 
   | 
| 48 | 
– | 
  type, public :: errorStruct | 
| 49 | 
– | 
    PRIVATE | 
| 50 | 
– | 
    SEQUENCE | 
| 51 | 
– | 
    character(len = MAX_SIM_ERROR_MSG_LENGTH) :: errMsg | 
| 52 | 
– | 
    logical :: isFatal | 
| 53 | 
– | 
    integer :: severity | 
| 54 | 
– | 
    logical :: isEventLoop; | 
| 55 | 
– | 
  end type errorStruct | 
| 56 | 
– | 
 | 
| 57 | 
– | 
  type (errorStruct), public, save :: painCave | 
| 58 | 
– | 
 | 
| 59 | 
– | 
#endif  |