Question

  Asked: Apr 10 2008   2:47 PM GMT
  Asked by: OracleATE


What is the PRAGMA_INIT exception?


pragma EXCEPTION_INIT, Oracle error messages, Oracle

What is the PRAGMA_INIT exception? Thank you.

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



Hi,

Do you mean PRAGMA EXCEPTION_INIT?

It's a way of associating names with user-defined exceptions, so you that exception handlers can refer to them by name. Here's an example from the Database Administrator's Guide:

DECLARE
null_salary EXCEPTION;
PRAGMA EXCEPTION_INIT(null_salary, -20101);
BEGIN
...
RAISE_APPLICATION_ERROR(-20101, 'salary is missing');
...
EXCEPTION
WHEN null_salary THEN
...
END;
  • AddThis Social Bookmark Button

Browse more Questions and Answers on Oracle.

Looking for relevant Oracle Whitepapers? Visit the SearchOracle.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register