Pragma Init Exception

What is Pragma Init Exception ? what is difference between user defined exception and init pragma exception. what is the use of it.

Questions by ily_saravanan   answers by ily_saravanan

Showing Answers 1 - 15 of 15 Answers

Taranjit Kaur

  • Mar 23rd, 2007
 

Pragma init exception is used to associate a user defined exception with an error number and a custom message.

  Was this answer useful?  Yes

Anil Hadli

  • Mar 23rd, 2007
 

Pragma Init Exception is the Non predefined exception. It will direct the complier to add the user defined error message to the oracle error number. It means that there are some predefined error codes which are not having the error message explicitly the programmer has to give error message for the predefined error code so the pragma Init Exception will direct the complier to associate the user defined error message to predefined error codes.

Regards,

Anil Hadli.

NoName

  • Sep 21st, 2007
 

User-defined exception should be raised explicitly, While Pragma Init exception can be associated with an Oracle inter error and be raised implicitly

  Was this answer useful?  Yes

Sachin Kale

  • Nov 21st, 2007
 

Pragma is a compiler Directive that is process at compile time, Not at run time.
In pl/sql the Pragma Exception_init tells the compiler to asociate an exception name with an oracle error number.
That lets you refer to any internal exception by name and to write specific handler for it
when you see an error stack, or sequence of error messages, the one on top that you can trap and handle

g_sidhu

  • Feb 19th, 2008
 

You trap a nonpredefined Oracle server error by declaring it first, or by using the OTHERS handler. The declared exception is raised implicitly. In PL/SQL, the PRAGMA EXCEPTION_INIT tells the compiler to associate an exception name with an Oracle error number. That allows you to refer to any internal exception by name and to write a specific handler for it.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions