Skip Headers
Oracle® Database PL/SQL Language Reference
11g Release 2 (11.2)

Part Number E10472-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

EXCEPTION_INIT Pragma

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 ::=

exception_init_pragma
Description of the illustration exception_init_pragma.gif

Semantics

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".

exception_name

The name of a user-defined exception.

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: