Re: Aborting PL/SQL script in Exception handler
Date: 1997/06/02
Message-ID: <3392F6C0.5CEF_at_mda.ca>#1/1
Ken wrote:
> 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;
I would have to agree that this is the cleanest and easiest method of propogating your exception. A word of caution though, if you have any 'WHEN OTHERS' exceptions embedded within your blocks then you will have to explicitly raise your expection so that the 'WHEN OTHERS' does not catch it.
Todd
Wm. Todd Bealor LINC Project Systems Developer E-mail: tbealor_at_mda.ca MacDonald Dettwiler Phone: +1 (613) 723-7667 x328 240 - 1101 Prince of Wales Dr. Fax: +1 (613) 723-7832 Ottawa, Ontario, Canada K2C 3W7 URL: http://www.mda.ca ------------------------------------------------------------------Received on Mon Jun 02 1997 - 00:00:00 CEST