Home » SQL & PL/SQL » SQL & PL/SQL » oracle 10g (Exception in PL/SQL)
oracle 10g [message #390205] Thu, 05 March 2009 07:43 Go to next message
ravi214u
Messages: 153
Registered: February 2008
Location: CANADA
Senior Member
Hi,

How to figure out which exception handling we can used in procedure. I am only using "when others"..
Please give suggestions.
Re: oracle 10g [message #390206 is a reply to message #390205] Thu, 05 March 2009 07:46 Go to previous messageGo to next message
joy_division
Messages: 4644
Registered: February 2005
Location: East Coast USA
Senior Member
WHEN OTHERS is your problem. If you use it, you'll never know. Search Google for Oracle exception handling and you can find out what types you can use.
Re: oracle 10g [message #390207 is a reply to message #390205] Thu, 05 March 2009 07:46 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
In that case, you'd better stop using WHEN OTHERS and see what happens. You'll probably see bunch of errors that were trapped by (this unfortunate) WHEN OTHERS.

If you are interested in all of them, Google for "predefined pl/sql exceptions".
Re: oracle 10g [message #390208 is a reply to message #390205] Thu, 05 March 2009 07:46 Go to previous message
cookiemonster
Messages: 12422
Registered: September 2008
Location: Rainy Manchester
Senior Member
If your code can generate an error you KNOW you can safely ignore - no_data_found for example - then write an exception handler to catch that exception.
Do not try and catch anything you aren't sure you can ignore.
Don't use when others.
Previous Topic: Problem with DBMS_JOB
Next Topic: manipulate the decode function?
Goto Forum:
  


Current Time: Fri Dec 09 21:33:42 CST 2016

Total time taken to generate the page: 0.13863 seconds