Re: Aborting PL/SQL script in Exception handler

From: Ken <ken_at_fifthd.ca>
Date: 1997/05/30
Message-ID: <338edcc1.2319354446_at_news.sas.ab.ca>#1/1


>On 29 May 97 18:58:48 GMT, "Mike Hill_at_PW" <mike_hill_at_ibm.net> wrote:
>
>>I have a PL/SQL script with a number of Begin...End blocks, each with its
>>own
>>exception handling.
>>
>>If an exception is encountered, I'm trying to figure out if there is a way
>>to abort the entire script so that processing does not continue onto the
>>next block.
>>

If you have an enclosing Begin...End around the entire script then to abort the script if an exception is raised in any inner begin..end block would simply require you raising an exception within you exception handler.
eg
begin...

   code
   begin...

      code...
   exception

      when form_trigger_failure
           code...
          raise form_trigger_failure
  • This will propogate the error to the enclosing block
  • where the script will terminate.

   end;
code
code

   begin...end
exception

   when form_trigger_failure
     code...
end;

Hope this helps.
Ken. Received on Fri May 30 1997 - 00:00:00 CEST

Original text of this message