rtxError.h File Reference
Error handling function and macro definitions. More...
#include "rtxsrc/rtxContext.h"
#include "rtxsrc/rtxErrCodes.h"
Go to the source code of this file.
Defines | |
#define | LOG_RTERR(pctxt, stat) rtxErrSetData(pctxt,stat,__FILE__,__LINE__) |
This macro is used to log a run-time error in the context. | |
#define | OSRTASSERT(condition) if (!(condition)) { rtxErrAssertionFailed(#condition,__LINE__,__FILE__); } |
This macro is used to check an assertion. | |
#define | OSRTCHECKPARAM(condition) if (condition) { /* do nothing */ } |
This macro check a condition but takes no action. | |
#define | LOG_RTERR_AND_FREE_MEM(ctxt_p, stat, mem_p) rtxMemFreePtr ((ctxt_p),(mem_p)), LOG_RTERR(ctxt_p, stat) |
This logs an error to a global context and frees a memory pointer allocated for encoding or decoding. | |
Functions | |
EXTERNRT OSBOOL | rtxErrAddCtxtBufParm (OSCTXT *pctxt) |
This function adds the contents of the context buffer to the error information structure in the context. | |
EXTERNRT OSBOOL | rtxErrAddDoubleParm (OSCTXT *pctxt, double errParm) |
This function adds a double parameter to an error information structure. | |
EXTERNRT OSBOOL | rtxErrAddErrorTableEntry (const char *const *ppStatusText, OSINT32 minErrCode, OSINT32 maxErrCode) |
This function adds a set of error codes to the global error table. | |
EXTERNRT OSBOOL | rtxErrAddElemNameParm (OSCTXT *pctxt) |
This function adds an element name parameter to the context error information structure. | |
EXTERNRT OSBOOL | rtxErrAddIntParm (OSCTXT *pctxt, int errParm) |
This function adds an integer parameter to an error information structure. | |
EXTERNRT OSBOOL | rtxErrAddInt64Parm (OSCTXT *pctxt, OSINT64 errParm) |
This function adds a 64-bit integer parameter to an error information structure. | |
EXTERNRT OSBOOL | rtxErrAddSizeParm (OSCTXT *pctxt, OSSIZE errParm) |
This function adds a size-typed parameter to an error information structure. | |
EXTERNRT OSBOOL | rtxErrAddStrParm (OSCTXT *pctxt, const char *pErrParm) |
This function adds a character string parameter to an error information structure. | |
EXTERNRT OSBOOL | rtxErrAddStrnParm (OSCTXT *pctxt, const char *pErrParm, size_t nchars) |
This function adds a given number of characters from a character string parameter to an error information structure. | |
EXTERNRT OSBOOL | rtxErrAddUIntParm (OSCTXT *pctxt, unsigned int errParm) |
This function adds an unsigned integer parameter to an error information structure. | |
EXTERNRT OSBOOL | rtxErrAddUInt64Parm (OSCTXT *pctxt, OSUINT64 errParm) |
This function adds an unsigned 64-bit integer parameter to an error information structure. | |
EXTERNRT void | rtxErrAssertionFailed (const char *conditionText, int lineNo, const char *fileName) |
This function is used to record an assertion failure. | |
EXTERNRT const char * | rtxErrFmtMsg (OSRTErrInfo *pErrInfo, char *bufp, size_t bufsiz) |
This function formats a given error structure from the context into a finished status message including substituted parameters. | |
EXTERNRT void | rtxErrFreeParms (OSCTXT *pctxt) |
This function is used to free dynamic memory that was used in the recording of error parameters. | |
EXTERNRT char * | rtxErrGetText (OSCTXT *pctxt, char *pBuf, size_t *pBufSize) |
This function returns error text in a memory buffer. | |
EXTERNRT char * | rtxErrGetTextBuf (OSCTXT *pctxt, char *pbuf, size_t bufsiz) |
This function returns error text in the given fixed-size memory buffer. | |
EXTERNRT char * | rtxErrGetMsgText (OSCTXT *pctxt) |
This function returns error message text in a memory buffer. | |
EXTERNRT char * | rtxErrGetMsgTextBuf (OSCTXT *pctxt, char *pbuf, size_t bufsiz) |
This function returns error message text in a static memory buffer. | |
EXTERNRT OSRTErrInfo * | rtxErrNewNode (OSCTXT *pctxt) |
This function creates a new empty error record for the passed context. | |
EXTERNRT void | rtxErrInit (OSVOIDARG) |
This function is a one-time initialization function that must be called before any other error processing functions can be called. | |
EXTERNRT int | rtxErrReset (OSCTXT *pctxt) |
This function is used to reset the error state recorded in the context to successful. | |
EXTERNRT void | rtxErrLogUsingCB (OSCTXT *pctxt, OSErrCbFunc cb, void *cbArg_p) |
This function allows error information to be logged using a user-defined callback routine. | |
EXTERNRT void | rtxErrPrint (OSCTXT *pctxt) |
This function is used to print the error information stored in the context to the standard output device. | |
EXTERNRT void | rtxErrPrintElement (OSRTErrInfo *pErrInfo) |
This function is used to print the error information stored in the error information element to the standard output device. | |
EXTERNRT int | rtxErrSetData (OSCTXT *pctxt, int status, const char *module, int lineno) |
This function is used to record an error in the context structure. | |
EXTERNRT int | rtxErrSetNewData (OSCTXT *pctxt, int status, const char *module, int lineno) |
This function is used to record an error in the context structure. | |
EXTERNRT int | rtxErrGetFirstError (const OSCTXT *pctxt) |
This function returns the error code, stored in the first error record. | |
EXTERNRT int | rtxErrGetLastError (const OSCTXT *pctxt) |
This function returns the error code, stored in the last error record. | |
EXTERNRT OSSIZE | rtxErrGetErrorCnt (const OSCTXT *pctxt) |
This function returns the total number of error records. | |
EXTERNRT int | rtxErrGetStatus (const OSCTXT *pctxt) |
This function returns the status value from the context. | |
EXTERNRT int | rtxErrResetLastErrors (OSCTXT *pctxt, int errorsToReset) |
This function resets last 'errorsToReset` errors in the context. | |
EXTERNRT int | rtxErrCopy (OSCTXT *pDestCtxt, const OSCTXT *pSrcCtxt) |
This function copies error information from one context into another. | |
EXTERNRT int | rtxErrAppend (OSCTXT *pDestCtxt, const OSCTXT *pSrcCtxt) |
This function appends error information from one context into another. | |
EXTERNRT int | rtxErrInvUIntOpt (OSCTXT *pctxt, OSUINT32 ident) |
This function create an 'invalid option' error (RTERR_INVOPT) in the context using an unsigned integer parameter. |
Detailed Description
Error handling function and macro definitions.
Definition in file rtxError.h.