Language Ref Manual references: 11.4 Exception Handling, 11 Exceptions
In this section...
7.5.1 Predefined Exceptions
7.5.3 Implementation-Defined Exceptions
|Summary of Guidelines from this section|
Language Ref Manual references: C Predefined Language Environment
Numeric_Errorexceptions with a
Numeric_Error | Constraint_Errorexception handler.
Numeric_Errormay be raised, an implementation is allowed to raise
Constraint_Errorinstead. In fact, there is no requirement that an implementation raise the same exception under the same circumstances. It is not enough to replace the
Numeric_Errorexception with a
Constraint_Error. Either one may be raised; and if
Numeric_Erroris raised, it will not be caught with a simple
Language Ref Manual references: 11.1 Exception Declarations, 11.2 Exception Handlers, C Predefined Language Environment
If you create interface packages for the implementation-specific portions of your program, those packages can catch or recognize implementation specific exceptions and convert them into user-defined exceptions that have been declared in the specification. Do not allow yourself to be forced to find and change the name of every handler you have written for these exceptions when the program is ported.
Language Ref Manual references: 11.1 Exception Declarations, 11.2 Exception Handlers, 11.3 Raise Statements