Re: PL/SQL: exception handling
Date: 1996/03/01
Message-ID: <4h5k9l$725_at_gossamer.itmel.bhp.com.au>#1/1
In article <3134a69b.935153_at_nntp.ix.netcom.com>, chuckh_at_ix.netcom.com (Chuck Hamilton) says:
>
>afischer_at_ea.com wrote:
>
>>gapinski_at_lerc.nasa.gov (Gary Gapinski) wrote:
>>>Hello, Chuck:
>>>
>>>An exception clause is needed in each block in order to catch any exception
>>>therein. You can refer to a common exception handler procedure from within
>>>each, if that makes life any easier. As long as you avoid raising another
>>>exception from within the handler, the successive sub-blocks will be
>>>executed.
>>>
>>>Regards,
>>>
>>>Gary
>>>
>>>--
>>>__________________________________________________________
>>>Gary Gapinski email: gapinski_at_lerc.nasa.gov
>>>NASA Lewis Research Center voice: +1 216 433 5251
>>>An exception clause is needed in each block in order to catch any exception
>>>therein.
>>
>>Sub block exceptions propagate to the enclosing block's exception handlers, if no handler
>>exists in the sub block for that exception (and no "when others").
>>
>Yes, but after the enclosing block's exception handler executes, it
>doesn't return control to the next statement after the sub-block, but
>rather the one after the enclosing block. I want it to do the
>opposite. If sub-block 1 traps an exception, I want it to continue to
>sub-block 2.
>--
>Chuck Hamilton
>chuckh_at_ix.netcom.com
>
>If at first you don't succeed, skydiving isn't for you.
I think gary meant on each sub-block, something like the following:
procedure <procname> is
procedure handle_exception is
begin
(stuff...)
end
begin
begin
- block 1 code exception when others then handle_exception end; begin
- block 2 code exception when others then handle_exception end; begin
- block 3 code exception when others then handle_exception end; begin
- block 4 code exception when others then handle_exception end; begin
- block 5 code exception when others then handle_exception end; end;
Does that help?
Lee
------/\/\------+--------------------------------------------------- / / /\ | Lee Levy, ISSD Systems Development, Del Code (34) / / / \ | BHP Information Technology, ACN 006 476 213 / / / /\ \ | PO Box 261, Warrawong, NSW 2502, Australia\ \/ / / / | PH: +61 42 75-5485 Fax: -5500 Tie: 8855- \ / / / | Internet : levy.lee.ls_at_bhp.com.au
-----\/\/\/-----+---------------------------------------------------Opinions expressed are mostly my own, so give me some credit. Received on Fri Mar 01 1996 - 00:00:00 CET