Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Debugging PL/SQL

Debugging PL/SQL

From: Mark Adrian Pether <930722_at_bud.swin.edu.au>
Date: 1997/02/11
Message-ID: <5dofc5$sm4$1@lucy.swin.edu.au>#1/1

I want to be able to programmatically trap exceptions in my program and display the line no and source line where error was generated, its easy to pull source line from user_source or all_source but this requires knowledge of the exception line number. SQLCODE and SQLERRM don't tell you the line number neither does dbms_utility.format_error_stack.

eg code:

declare
  procedure a is
    d number;
  begin
    d:= 9/0;
  end a;
begin
  a;
exception
  when others then
    display exception line no => 5
    display source line => d:= 9/0;
    along with ordinary DIVIDE BY ZERO message end;

Is this possible? I'm using Oracle v7.2.

Any help greatly appreciated. Received on Tue Feb 11 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US