Re: Toward an omnibus Perl 6 Exceptions RFC, v0.1.
[email protected] (Chaim Frenkel) 16 Aug 2000 18:44:42 -0400
| Newsgroups | perl.perl6.language.errors |
|---|---|
| Message-ID | <[email protected]> |
>>>>> "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