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
Why is sql better than hql?
Explain the components of sql?
What is the difference between unique and primary key constraints?
What will you get by the cursor attribute sql%found?
what is the maximum length of a table name, database name, and fieldname in mysql? : Sql dba
How do I copy a table in sql?
What is form and report?
what is meant by urlencode and urldocode? : Sql dba
Why use truncate instead of delete?
explain commit and rollback in mysql : sql dba
name 3 ways to get an accurate count of the number of records in a table? : Sql dba
Which data dictionary views have the information on the triggers that are available in the database?
What is difference between sql function and stored procedure?
What is varray in pl sql?
how to include character strings in sql statements? : Sql dba