Home » SQL & PL/SQL » SQL & PL/SQL » ORA error to PL/SQL exception
ORA error to PL/SQL exception [message #308527] Mon, 24 March 2008 12:56 Go to next message
annagel
Messages: 220
Registered: April 2006
Senior Member
Does anyone know of a method, or good source for mapping oracle error number to the PL/SQL exception I should handle to account for the error? It seems like one of those things that aught to be easy to find but all my Googling thus far just keeps turning up ORA error definitions.

Andrew
Re: ORA error to PL/SQL exception [message #308529 is a reply to message #308527] Mon, 24 March 2008 13:13 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
SQL> begin dbms_output.put_line(sqlerrm(-1031)); end;

ORA-01031: insufficient privileges

Is this what you are asking for?

Regards
Michel

[Updated on: Mon, 24 March 2008 13:14]

Report message to a moderator

Re: ORA error to PL/SQL exception [message #308532 is a reply to message #308529] Mon, 24 March 2008 13:18 Go to previous message
annagel
Messages: 220
Registered: April 2006
Senior Member
Actually what I was looking for was <a href="http://www.itk.ilstu.edu/docs/Oracle/appdev.101/b10807/07_errs.htm#i9355" target="_blank">this</a> which I found a short time after posting the question. Basically I was looking for if I see that I am getting a ORA-01476 (divide by zero) in my code and I know this might happen and want to handle in code, how would I know what exception to catch.

Andrew

[Updated on: Mon, 24 March 2008 13:18]

Report message to a moderator

Previous Topic: Clean up multiple sum queries
Next Topic: mutating trigger function
Goto Forum:
  


Current Time: Sat Dec 03 10:07:15 CST 2016

Total time taken to generate the page: 0.16722 seconds