Claus Pedersen
Member³
To Marco Kalter:
I have with little success tried to get access to the call stack from an exception. PLD can parse the error stack to show the source, how do you do that? If this is a business secret, I fully understand, but can you give me an hint on how to perform a similar function in PL/SQL code?
To all others:
can enyone tell me how I can get the name of my current package.method when an execption occours.
I have tried SQLERRM, dbms_utility.format_call_stack, dbms_utility.format_error_stack but with no success.
Our applicationh has it's own exception handler that we call with package and method name to get the right context, but I would like the exception handler to extract the current method and eventually line number by itself.
If I get an exception in the GUI, I get the full context:
or similar.
SQLERRM return the Oracle error like "ORA-02290: check constraint (SCOTT.EMP_VALID_JOB) violated" but I can not get the context.
Does anybody have an idea?
I have with little success tried to get access to the call stack from an exception. PLD can parse the error stack to show the source, how do you do that? If this is a business secret, I fully understand, but can you give me an hint on how to perform a similar function in PL/SQL code?
To all others:
can enyone tell me how I can get the name of my current package.method when an execption occours.
I have tried SQLERRM, dbms_utility.format_call_stack, dbms_utility.format_error_stack but with no success.
Our applicationh has it's own exception handler that we call with package and method name to get the right context, but I would like the exception handler to extract the current method and eventually line number by itself.
If I get an exception in the GUI, I get the full context:
Code:
ORA-02290: check constraint (SCOTT.EMP_VALID_JOB) violated
ORA-06512: at "SCOTT.TEST", line 35
ORA-06512: at line 7
SQLERRM return the Oracle error like "ORA-02290: check constraint (SCOTT.EMP_VALID_JOB) violated" but I can not get the context.
Does anybody have an idea?