Go to the source code of this file.
|
|
#define | ION_ERROR_MESSAGE_MAX_LENGTH 1024 |
| #define | DEBUG_ERR(x) |
| #define | DEBUG_ERRMSG(x, m) |
|
#define | BREAK ion_helper_breakpoint() /* nothing */ |
| #define | ENTER(f, l, c) |
| #define | RETURN(f, l, c, e) |
|
#define | FN_DEF /* nothing */ |
|
#define | iENTER FN_DEF iERR err = IERR_OK |
| #define | DONTFAILWITH(x) |
| #define | FAILWITH(x) |
| #define | FAILWITHMSG(x, s) |
| #define | IONCHECK(x) |
| #define | SUCCEED() |
|
#define | iRETURN fail: RETURN(__location_name__, __line__, __count__++, err) |
| #define | UPDATEERROR(x) |
|
#define | ION_TIMESTAMP_STRING_LENGTH 55 /* does NOT include null terminator */ |
|
#define | ION_VERSION_MARKER_LENGTH 4 |
|
| GLOBAL BOOL g_ion_debug_tracing | INITTO (FALSE) |
|
ION_API_EXPORT BOOL | ion_debug_has_tracing (void) |
|
ION_API_EXPORT void | ion_debug_set_tracing (BOOL state) |
◆ DEBUG_ERR
◆ DEBUG_ERRMSG
| #define DEBUG_ERRMSG |
( |
| x, |
|
|
| m ) |
◆ DONTFAILWITH
| #define DONTFAILWITH |
( |
| x | ) |
|
◆ ENTER
| #define ENTER |
( |
| f, |
|
|
| l, |
|
|
| c ) |
◆ FAILWITH
Value:{ BREAK; DEBUG_ERR(x); err = x; goto fail; }
◆ FAILWITHMSG
| #define FAILWITHMSG |
( |
| x, |
|
|
| s ) |
Value:{ BREAK; DEBUG_ERRMSG(x,s); err = x; goto fail; }
◆ IONCHECK
Value:{ err = x; if (err) goto fail; }
◆ RETURN
| #define RETURN |
( |
| f, |
|
|
| l, |
|
|
| c, |
|
|
| e ) |
◆ SUCCEED
Value:{ err = IERR_OK; goto fail; }
◆ UPDATEERROR
Value:{ iERR errBackup = (x); if (err == IERR_OK) { err = errBackup; }}
The purpose of this Macro is enabling executing a list of functions while keeping the first error encountered.
Each function(x) to be executed must have return type of iERR, and need to be enclosed by this Macro.
If error has already happened before, the error code of the current function will be ignored. If there're no previous errors, the return code of the current function will be kept.
◆ INITTO()
| GLOBAL BOOL g_ion_debug_tracing INITTO |
( |
FALSE | | ) |
|
DEPRECATED - use the accessor functions below.