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


Please Help Members By Posting Answers For Below Questions

What is optimistic concurrency control? : Transact sql

544


What are different types of tables in sql?

526


What is user in sql?

575


What is number function in sql?

525


What are the topics in pl sql?

518






Which join is default?

519


What is the sql query to display the current date?

549


How can use stored procedures in sql?

580


What is the difference between a database and a relational database?

558


How to place comments in pl/sql?

602


what are the different functions in sorting an array? : Sql dba

579


How do I partition a table in sql?

540


i have some prob lem to tell me about my self in interview first round ...

1700


How do I enable sql encryption?

518


What does select count (*) mean in sql?

546