How to trace the errors in pl/sql block code?
Answer Posted / shai
Follow best practice for exceptions:
Try using: (available from 10g)
1. dbms_utility.format_error_backtrace
2. dbms_utility.format_error_stack
Example:
declare
x varchar2(10);
begin
select 15445454545 into x from dual;
exception
when others then
dbms_output.put_line
(dbms_utility.format_error_backtrace || ' ' ||
dbms_utility.format_error_stack);
end;
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
what are tables and fields? : Sql dba
Enlist some predefined exceptions?
What are different types of statements supported by sql?
Can I learn sql in a week?
Can I call a procedure inside a function?
Explain architecture of sql server notification services?
what is a join? : Sql dba
what are the security recommendations while using mysql? : Sql dba
what are the differences between char and nchar? : Sql dba
what is the difference between char_length and length? : Sql dba
what are the different type of normalization? : Sql dba
Is json a nosql?
Why do you partition data?
What are sql constraints?
Is sql dba a good career? : SQL DBA