Error Formatting and Print Functions
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.
- 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).
Copyright © Objective Systems 2002-2008 This document may be distributed in any form, electronic or otherwise, provided that it is distributed in its entirety and that the copyright and this notice are included. |
Objective Systems, Inc.55 Dowlin Forge RoadExton, Pennsylvania 19341 http://www.obj-sys.com Phone: (484) 875-9841 Toll-free: (877) 307-6855 (US only) Fax: (484) 875-9830 info@obj-sys.com |