Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Nested exceptions

Developer001Aug 1 2013 — edited Aug 1 2013


Hi everybody,

I need to handle an expection that occurs inside of the exception itself, is there a way to declare nested excpetions?

My example:

My program should insert into error_table if ini_table doesn't exist, but should insert into error_table_2 if error_table_1 doesn't exist also.

This one cannot raise the exception (1)

  BEGIN

   ...

    INSERT INTO ini_table.. (But ini_table doens't exist) 

  Exception

    WHEN ORA-00942 THEN  - - - (1)

            INSERT INTO error_table_1... ; (But my error_table_1 doesn't exist)

  Exception

    WHEN OTHERS THEN    - - - (2)

           INSERT INTO error_table_2...

  End;

Can someone help me?

Thanks.

This post has been answered by Hoek on Aug 1 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 29 2013
Added on Aug 1 2013
14 comments
1,553 views