Previous | Table of Contents | Next |
Exception declarations permit the declaration of struct-like data structures, which may be returned to indicate that an exceptional
condition has occurred during the performance of a request. The syntax is as follows:
(86) <except_dcl> ::= “exception? <identifier> “{“ <member>* “}?
Each exception is characterized by its OMG IDL identifier, an exception type identifier, and the type of the associated return
value (as specified by the <member> in its declaration). If an exception is returned as the outcome to a request, then the
value of the exception identifier is accessible to the programmer for determining which particular exception was raised.
If an exception is declared with members, a programmer will be able to access the values of those members when an exception
is raised. If no members are specified, no additional information is accessible when an exception is raised.
An identifier declared to be an exception identifier may thereafter appear only in a raises clause of an operation declaration,
and nowhere else.
A set of standard system exceptions is defined corresponding to standard run-time errors, which may occur during the execution
of a request. These standard system
exceptions are documented in Section 4.12, “Exceptions,? on page 4-63.