>>>>> "JSD" == Jonathan Scott Duff <[EMAIL PROTECTED]> writes:

JSD> On Wed, Aug 16, 2000 at 12:36:42PM -0700, Peter Scott wrote:
>> If you use a switch statement and want implicit rethrow (and I do), then 
>> your exception handler somehow has to look inside the switch to see if an 
>> exception was handled.  Even if that's possible, it implies a level of 
>> incestuousness that isn't good; what if the programmer puts something 
>> besides a switch in the catch/else block?  Is it supposed to look inside 
>> that too to figure out if the exception was caught?

JSD> Let the programmer tell Perl that the exception was handled.  I
JSD> suggested in another email that "undef $@" would do it.  But that's
JSD> just an idea.

Though if the finally block needs to differentiate between an unwind
and a normal situation you would lose that fact. Hmm, unless you
restore the value in the finally block. But that is confusing.

I think you will find a reasonably even split between the two camps.

One possible weight would be how often a caught exception would be
rethrown. If the percentage is high enough, then why not simply add
the rethrow in the otherwise section.

<chaim>
-- 
Chaim Frenkel                                        Nonlinear Knowledge, Inc.
[EMAIL PROTECTED]                                               +1-718-236-0183

Reply via email to