Oracle® Database PL/SQL Language Reference 11g Release 2 (11.2) Part Number E10472-05 |
|
|
View PDF |
The EXCEPTION_INIT
pragma associates a user-defined exception name with an Oracle Database error number. You can intercept any Oracle Database error number and write an exception handler for it, instead of using the OTHERS
handler.
Topics:
Syntax
exception_init_pragma ::=
Semantics
exception_name
The name of a user-defined exception.
error_number
A valid Oracle Database error number not already associated with a user-defined exception. For a list of Oracle Database error messages and information about them, including their numbers, see Oracle Database Error Messages.
Note:
These are the same error numbers (always negative) returned by the"SQLCODE Function".Usage
A EXCEPTION_INIT
pragma can appear only in the same declarative part as its associated exception, anywhere after the exception declaration.
Examples
Related Topics
In this chapter:
In other chapters: