Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determining line where error occurs? 1

Status
Not open for further replies.

thendrickson

Programmer
Apr 14, 2004
226
US
I am very new with Oracle and am trying to debug legacy procs.
The procs are not well designed in my opinion but it is what it is and I need to find out exactly where the errors occur.

What I would like to do is figure out a way to add the actual line Oracle fails on and log it along with the the usual informat5ion I currently log (proc name, error message error number, sysdate)

Currently, I have the line number of each Exception handler starting line hardcoded in each handler to enable me to determine which error handler catches the error. At best, this solution is confusing to other people.

Almost forgot, Thiis is Oracle 10g
 
This is an old problem in PL/SQL and a source of great annoyance to me as well. It's one of the reasons I loathe exception handlers (especially ones which do no more than dbms_output.put_line(sqlerrm)).

In Oracle 10, there is a partial solution to the problem in the form of the procedure DBMS_UTILITY.FORMAT_ERROR_BACKTRACE.

For Oracle-related work, contact me through Linked-In.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top