Error Return Mechanisms
List of: Discussion Topic
Subjects: Error Handling
Contents: Application Development Manual

The outcome class contains a pointer to an error_info object. Each API has the option of returning additional error information in objects derived from error_info. Although no restriction is placed on the information these objects contain, new ENTITYs will be lost during roll back.

The base class error_info object contains class ID and object type methods, allowing the user to quickly determine the information available in a given error_info object. Each error_info object is allocated on the heap, and the outcome cleans up any error_info object it references.

Error System Process


1. At the start of each API, a global variable pointer to an error_info object is set to NULL.


2. Before sys_error is called, the global pointer is set to contain the relevant error_info object.


3. At the end of the API, before the outcome is returned, the global variable is examined, and if nonempty, the error_info is added to the outcome.

Two overloaded versions of the function sys_error set a global pointer to an error_info object. One version is passed an error_info object, and the other creates a standard_error_info object when sys_error is passed one or two ENTITYs. The standard_error_info class is derived from error_info, which provides error data that is adequate in a majority of cases, such as local operations and blending.

In the Local Ops, Remove Faces, and Shelling components, the error_info object returns an ENTITY that further specifies where the local operation first fails, when such information is available. A standard_error_info object is adequate for use in these components, and more detailed information could be returned, if necessary, by deriving a new class.
PDF/APPDEV/06ERR.PDF
HTM/DATA/ACIS/APPDEV/06ERR/0008.HTM