Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Debugging PL/SQL
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
![]() |
![]() |