ORA-64610: bad depth indicator when using Utl_Call_Stack
Hello folks,
I have an Oracle 12.2.0 database
There I have a PL/SQL logic which is called from an update trigger.
From this logic, following code segment is called to get the format call stack.
FUNCTION Format_Stack___ RETURN VARCHAR2
IS
call_stack_ VARCHAR2(32000);
depth_ PLS_INTEGER := Utl_Call_Stack.Dynamic_Depth();
BEGIN
FOR i_ IN REVERSE 1 .. depth_ LOOP
call_stack_ := call_stack_ || UTL_Call_Stack.Concatenate_Subprogram(UTL_Call_Stack.Subprogram(i_)) || ' at line ' || To_Char(UTL_Call_Stack.Unit_Line(i_)) || chr(10);
END LOOP;
RETURN stack_;
END Format_Stack___;
Running this code segment raises the ORA-64610: bad depth indicator