If you're on 12 and above, see if UTL_CALL_STACK helps
SQL> create or replace package PKG is
2 procedure p;
3 procedure p1;
4 procedure p2;
5 procedure p3;
6 end;
7 /
Package created.
SQL> create or replace package body PKG is
2
3 procedure p is
...
19
20 exception
21 when others then
22 for i in 1 .. utl_call_stack.dynamic_depth loop
23 dbms_output.put_line(
24 utl_call_stack.unit_line(i)||'-'||
25 utl_call_stack.concatenate_subprogram(
26 utl_call_stack.subprogram(i))
27 );
28 end loop;
29 raise;
30 end;
31
32 procedure p1 is begin p; end;
33 procedure p2 is begin p1; end;
34 procedure p3 is begin p2; end;
35
36 end;
37 /
Package body created.
SQL> exec pkg.p3
23-PKG.P
32-PKG.P1
33-PKG.P2
34-PKG.P3
1-__anonymous_block
BEGIN pkg.p3; END;
*
ERROR at line 1:
ORA-01476: divisor is equal to zero
ORA-06512: at "SCOTT.PKG", line 29
ORA-06512: at "SCOTT.PKG", line 32
ORA-06512: at "SCOTT.PKG", line 33
ORA-06512: at "SCOTT.PKG", line 34
ORA-06512: at line 1
Notice you get all the subprograms, not just the package name as you get with FORMAT_CALL_STACK