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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Error handling approach

epipkoMar 7 2018 — edited Mar 8 2018

Hi,

I have the following setup. Procedures A, B, C do not have exception handling in them. How do I build overall exception handling so if proc B fails, the error will be propagated into outside exception handler, will get logged and emailed, but I need to continue with proc C.

The way I have it now, the execution is halted as soon as proc B fails. Does that mean I have to build exception handling in each of A,B and C procedures?

create or replace package test as

proc main;

proc A;

proc B;

proc C;

end test;

/

create or replace package body test as

procedure main is

begin

     proc A;

     proc B;

     proc C;

exception

     when others then

          ... log error

          ... email error

end main;

procedure A is

begin

     ... codel goes here

end A;

procedure B is

begin

     ... code goes here

end B;

procedure C is

begin

     ... code goes here

end C;

end test;

/

Thanks,

This post has been answered by L. Fernigrini on Mar 7 2018
Jump to Answer

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 5 2018
Added on Mar 7 2018
9 comments
438 views