GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  PL/SQL
Go To First  |  Previous Question  |  Next Question 
 PL/SQL  |  Question 171 of 241    Print  
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.


  
Total Answers and Comments: 5 Last Update: February 19, 2008     Asked by: ily_saravanan 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Anil Hadli
 
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.

Above answer was rated as good by the following members:
ds_devi, radheshyambidada
March 23, 2007 01:56:16   #1  
Taranjit Kaur        

RE: Pragma Init Exception
Pragma init exception is used to associate a user defined exception with an error number and a custom message.
 
Is this answer useful? Yes | No
March 23, 2007 03:59:58   #2  
Anil Hadli        

RE: Pragma Init Exception
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.

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
September 21, 2007 11:11:51   #3  
NoName        

RE: Pragma Init Exception

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


 
Is this answer useful? Yes | No
November 21, 2007 03:52:37   #4  
Sachin Kale        

RE: Pragma Init Exception
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

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
February 19, 2008 11:31:42   #5  
g_sidhu Member Since: August 2007   Contribution: 122    

RE: Pragma Init Exception

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.


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape