Error formatting and print functions allow information about encode/decode errors to be added to a context block structure and then printed when the error is propagated to the top level.
The LOG_RTERR macro is inserted in the generated code by the compiler to record the position of an error in the code and store information on the error in the context structure.
The OSRTASSERT macro can be used to test an assertion in much the same as the standard C assert call. If the assertion is false, the macro will cause the program to exit and a printout showing the file and line number of failure along with the failed condition will be shown.
Other key error handling routines for printing error information are as follows:
rtxErrPrint - This function prints a message to standard output containing the error information recorded in the context by calls to LOG_RTERR.
rtxErrLogUsingCB - This function allows information on an error to be logged using a user defined callback function. It is useful in environments where printing to standard output is not always an option (for example, in a Windows GUI application or an embedded application).
For a complete list and full description of all of the error formatting and print functions, see the XBinder C/C++ Runtime Reference Manual.