Condition handling
Exception conditions
An exception condition is either a condition associated with a specific exception status indicator or an exception object. An exception object is any object that is raised by the execution of either a RAISE Statement in which the object is specified in the RAISING phrase. An exception status indicator is a conceptual entity that exists for each function, method, or program for each exception condition and has two states, set or cleared. The initial state of all exception status indicators is cleared. An exception status indicator is set when the associated exception exists. Associated with each exception status indicator are one or more exception-names. These exception names, together with the interface-names and class-names of exception objects are used to enable checking for the exception condition, to specify the action to be taken when the exception is raised, and to determine which exception condition caused an exception declarative to be executed.
Unless otherwise specified, if more than one exception is detected during the execution of a statement, the one that is set to exist is undefined. The execution of the statement may be successful or unsuccessful, depending on the rules for the statement, and the fatality of the exception condition. If no exception is detected during the execution of a statement or if checking for an exception that occurs is not enabled, no exception condition is raised. All exception status indicators are cleared at the beginning of the execution of any statement.