Home » SQL & PL/SQL » SQL & PL/SQL » WHEN OTHERS Exception (Oracle 9i)
icon5.gif  WHEN OTHERS Exception [message #347777] Sat, 13 September 2008 21:36 Go to next message
prachi.mgorwadkar
Messages: 75
Registered: May 2007
Location: Pune
Member
Sir,

If, I have WHEN OTHERS exception in my block, and while processing my program, I get any non-Oracle Exception.
Will that non-Oracle exception get trapped in OTHERS exception?

My answer is NO, as OTHERS will only handle Oracle definewd exceptions or the non-defined Oracle exceptions. It will not handle non-Oracle exceptions like Form's Error messages or the User-defined messages.

But I just want a confirmation for this answer.

Thanks and Regards,
-Prachi G.
Re: WHEN OTHERS Exception [message #347779 is a reply to message #347777] Sat, 13 September 2008 22:07 Go to previous messageGo to next message
BlackSwan
Messages: 25041
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
Please read & FOLLOW the Posting Guidelines as stated in URL above

You choose to not follow Posting Guidelines.
We choose to not answer your question(s).
Re: WHEN OTHERS Exception [message #347783 is a reply to message #347777] Sat, 13 September 2008 23:15 Go to previous messageGo to next message
tanmoy1048
Messages: 133
Registered: June 2007
Senior Member
You are definitely right.
Re: WHEN OTHERS Exception [message #347788 is a reply to message #347777] Sat, 13 September 2008 23:59 Go to previous messageGo to next message
Michel Cadot
Messages: 64120
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
I have WHEN OTHERS exception in my block

Correction: you have a BUG in your program.

Regards
Michel
Re: WHEN OTHERS Exception [message #347801 is a reply to message #347788] Sun, 14 September 2008 01:42 Go to previous messageGo to next message
pablolee
Messages: 2834
Registered: May 2007
Location: Scotland
Senior Member
Michel Cadot wrote on Sun, 14 September 2008 05:59

Correction: you have a BUG in your program.



Not if he has included RAISE in the WHEN OTHERS... Wink
Re: WHEN OTHERS Exception [message #347802 is a reply to message #347777] Sun, 14 September 2008 01:59 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
prachi.mgorwadkar wrote on Sun, 14 September 2008 04:36
Sir,

If, I have WHEN OTHERS exception in my block, and while processing my program, I get any non-Oracle Exception.
Will that non-Oracle exception get trapped in OTHERS exception?

My answer is NO, as OTHERS will only handle Oracle definewd exceptions or the non-defined Oracle exceptions. It will not handle non-Oracle exceptions like Form's Error messages or the User-defined messages.

But I just want a confirmation for this answer.

Thanks and Regards,
-Prachi G.


Define non-Oracle errors within a PL/SQL block.
WHEN OTHERS catches each and every error that can occur during the execution of the PL/SQL block it handles.
icon5.gif  Re: WHEN OTHERS Exception [message #347803 is a reply to message #347802] Sun, 14 September 2008 02:05 Go to previous messageGo to next message
prachi.mgorwadkar
Messages: 75
Registered: May 2007
Location: Pune
Member
Thanks Frank. Thanks a lot.

Do you mean WHEN OTHERS handle every error including non-Oracle errors, if not defined in the exception handling part?

Thanks
-Prachi
Re: WHEN OTHERS Exception [message #347807 is a reply to message #347803] Sun, 14 September 2008 02:17 Go to previous message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Reread my reply:

You keep mentioning non-Oracle errors. Give me an example of a non-Oracle error that can occur in a PL/SQL block.
Not some vague example like 'a Forms error', but a concrete description of what can go wrong.
Previous Topic: separate decimal point
Next Topic: NOT NULL Constraint
Goto Forum:
  


Current Time: Tue Dec 06 12:32:14 CST 2016

Total time taken to generate the page: 0.13821 seconds