Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: DBMS_UTILITY.FORMAT_ERROR_BACKTRACE issue
ok guys, how can you explain this. I added a wrapper procedure that
calls my test procedure, and moved the exception when others to the
new wrapper procedure. Now, the backtrace gives me the extact line
number where the error happened.
Very weird.
CREATE OR REPLACE package body za_test is
procedure test is
cursor c is
select 1
from dual;
v_1 varchar2(1);
begin
for r in c loop
v_1 := '3333333'; -- line 15
end loop;
end test;
procedure wrapper is
begin
za_test.test;
exception when others then
dbms_output.put_line('sqlerrm: '||SQLERRM); dbms_output.put_line('backtrace: '||DBMS_UTILITY.FORMAT_ERROR_BACKTRACE);
end za_test;
/
exec za_test.wrapper
sqlerrm: ORA-06502: PL/SQL: numeric or value error: character string
buffer too small
backtrace: ORA-06512: at "ZA_TEST", line 15
ORA-06512: at "ZA_TEST", line 25
Received on Wed May 02 2007 - 09:22:28 CDT
![]() |
![]() |