In addition to user-defined exceptions (those defined explicitly in an IDL file), there are several predefined exceptions for system run-time errors. A system exception can be returned on any method call. (That is, they are implicitly declared for every method whose class uses IDL call style, and they do not appear in any raises expressions.) The standard exceptions are listed in Table 2 of Section 4.2, "SOM Interface Definition Language". Most of the predefined system exceptions pertain to Object Request Broker errors. Consequently, these types of exceptions are most likely to occur in DSOM applications (Chapter 6).
Each of the standard exceptions has the same structure: an error code (to designate the subcategory of the exception) and a completion status code. For example, the NO_MEMORY standard exception has the following definition:
enum completion_status {YES, NO, MAYBE}; exception NO_MEMORY { unsigned long minor; completion_status completed; };
The completion status value indicates whether the method was never initiated (NO), completed execution prior to the exception (YES), or the completion status is indeterminate (MAYBE).
Since all the standard exceptions have the same structure, file "somcorba.h" (included by "som.h") defines a generic StExcep typedef which can be used instead of the specific typedefs:
typedef struct StExcep { unsigned long minor; completion_status completed; } StExcep;
The standard exceptions are defined in an IDL module called StExcep, in the file named "stexcep.idl", and the C definitions can be found in "stexcep.h".