Defines | |
| #define | MqPanicC(error, prefix, errnum, string) MqPanicV(error,prefix,errnum,"%s",string); |
do a 'panic' with string as argument
| |
| #define | MqPanicSYS(error) MqPanicV(error,__func__,-1,"%s","internal ERROR, please contact your local support"); |
do a 'panic' with a 'system' error message
| |
| #define | MqErrorC(error, prefix, errnum, str) MqErrorSGenV(error,prefix,MQ_ERROR ,errnum,"%s", str); |
| set an error in MqErrorS with string argument | |
| #define | MqWarningC(error, prefix, str) MqErrorSGenV(error,prefix,MQ_WARNING,-1,"%s", str); |
| set a warning in MqErrorS with string argument | |
| #define | MqErrorV(error, prefix, errnum, fmt, args...) MqErrorSGenV(error,prefix,MQ_ERROR,errnum,fmt, args); |
| set an error in MqErrorS with vararg string argument | |
| #define | MqWarningV(error, prefix, fmt, args...) MqErrorSGenV(error,prefix,MQ_WARNING,-1,fmt,args); |
| set a warning in MqErrorS with vararg string argument | |
| #define | MqErrorSAppendC(error, str) MqErrorSAppendV(error,"%s",str); |
| append a string to a MqErrorS | |
| #define | MQ_ERROR_PROC_FMT "found in procedure \"%s\" at file " cppxstr(__FILE__) |
| append the procedure stack to a MqErrorS | |
| #define | MqErrorCheck(PROC) if (unlikely((PROC) == MQ_ERROR)) goto error |
| check on error and goto label error | |
| #define | MqErrorCheck1(PROC) if (unlikely((PROC) == MQ_ERROR)) goto error1 |
| check on error and goto label error1 | |
| #define | MqErrorCheck2(PROC, JUMP) if (unlikely((PROC) == MQ_ERROR)) goto JUMP |
| check on error and goto label JUMP | |
| #define | MqOkCheck(PROC) if (likely((PROC) == MQ_OK)) goto ok |
| check on OK and goto label ok | |
| #define | MqErrorCheckNULL(PROC) if (unlikely((PROC) == NULL)) goto error |
| check on NULL and goto error | |
| #define | MqErrorCheckNULL1(PROC) if (unlikely((PROC) == NULL)) goto error1 |
| check on NULL and goto error1 | |
Enumerations | |
| enum | MqErrorE { MQ_OK, MQ_ERROR, MQ_WARNING, MQ_CONTINUE } |
| collection for the different states of an error More... | |
Functions | |
| MQ_EXTERN void | MqPanicVL (MqErrorSP const error, const char *prefix, const MQ_INT4 errnum, const char *fmt, va_list ap) __attribute__((noreturn)) |
do a 'panic' with vararg list
| |
| MQ_EXTERN void | MqPanicV (MqErrorSP const error, const char *prefix, const MQ_INT4 errnum, const char *fmt,...) __attribute__((noreturn)) |
do a 'panic' with vararg strings
| |
| MQ_EXTERN void | MqErrorReset (MqErrorSP const error) |
| reset a MqErrorS, change state to MQ_OK | |
| MQ_EXTERN MqErrorE | MqErrorSGenVL (MqErrorSP const error, const char *prefix, const MqErrorE status, const MQ_INT4 errnum, const char *fmt, va_list ap) |
| set a state in MqErrorS with vararg list argument | |
| MQ_EXTERN MqErrorE | MqErrorSGenV (MqErrorSP const error, const char *prefix, const MqErrorE status, const MQ_INT4 errnum, const char *fmt,...) |
| set a state in MqErrorS with vararg string argument | |
| MQ_EXTERN MqErrorE | MqErrorSAppendV (MqErrorSP const error, const char *fmt,...) |
| append a vararg string to a MqErrorS | |
| MQ_EXTERN MqErrorE | MqErrorSSend (MqErrorSP const error, const char *prefix) |
| send or print a MqErrorS | |
| MQ_EXTERN MqErrorE | MqErrorGetStatus (MqErrorSP const error) |
| return the value of MqErrorS status member | |
| MQ_EXTERN MQ_STR | MqErrorGetString (MqErrorSP const error) |
| return the value of MqErrorS text member | |
| MQ_EXTERN MQ_INT2 | MqErrorGetNum (MqErrorSP const error) |
| return the value of MqErrorS num member | |
| MQ_EXTERN MqBufferSP const | MqErrorGetText (MqErrorSP const error) |
| reset the MqErrorS status member to OK and return the text member as MqBufferS | |
| MQ_EXTERN MqSP | MqErrorGetMsgque (MqErrorSP const error) |
| get MqErrorS msgque member | |
| MQ_EXTERN void | MqErrorLog (MqErrorSP const error, const char *prefix) |
| log the MqErrorS for debugging | |
| MQ_EXTERN MqErrorE | MqErrorCopy (MqErrorSP out, MqErrorSP const in) |
| copy a MqErrorS from in to out | |
the management is done with a MqErrorS object created by MgCreate. every MqS object has only one MqErrorS object and every MqErrorS object has only one MqS object. the MqErrorS object is used to collect all data needed to handle an error.
|
|
collection for the different states of an error
|
1.3.8-20040928