Hi. Im working on a pl-sql script, in which I have about 10 TO_CHAR conversions.
One of them is throwing an
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
exception.
Currently, im logging the message with this piece of code
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.put_line('Exception message is '||SQLERRM(sqlcode));
ROLLBACK;
I'd like to add (mostly for debugging purposes) the line where the exception is thrown, in order to receive a message in the form of
ORA-06502: PL/SQL: numeric or value error: character string buffer too small (at line x)
Is there an easy way to do this?