Nice. The continue clause, I assume would re-raise an uncaught exception. But, a big but. How does the 'else' clause indicate that the exception was handled? A couple of possiblities 1. Undef $@. But that's a bit of extra work in each leg. 2. switch is 'slightly' special in an eval/else block. If the case selects the error, then it is considered handled unless a die or redo is encountered. 3. If continue is not being used by Damian's switch, then a continue continues onto the continue block, and marks the successful handling of the exception. <chaim> >>>>> "GB" == Graham Barr <[EMAIL PROTECTED]> writes: GB> I was more thinking of GB> eval { GB> # fragile code GB> } GB> else { # catch ALL exceptions GB> switch ($@) { GB> case __->isa('IO') { ... } GB> case __->isa('Socket') { ... } GB> else { ... } GB> } GB> } GB> continue { GB> # code always executed (ie finally) GB> } GB> And the only new keywords are for the switch statement. -- Chaim Frenkel Nonlinear Knowledge, Inc. [EMAIL PROTECTED] +1-718-236-0183
- Re: RFC 80 (v1): Exception objects and... John Porter
- Re: RFC 80 (v1): Exception objects and... Piers Cawley
- Re: RFC 80 (v1): Exception objects and... Chaim Frenkel
- Re: RFC 80 (v1): Exception objects and... Piers Cawley
- Re: RFC 80 (v1): Exception objects and... Chaim Frenkel
- Re: RFC 80 (v1): Exception objects and... John Porter
- Re: RFC 80 (v1): Exception objects and... Tony Olekshy
- Re: RFC 80 (v1): Exception objects and classes for ... Peter Scott
- Re: RFC 80 (v1): Exception objects and classes for buil... Bart Lateur
- Re: RFC 80 (v1): Exception objects and classes for builtins Chaim Frenkel
- Re: RFC 80 (v1): Exception objects and classes for buil... Graham Barr
- Re: RFC 80 (v1): Exception objects and classes for ... Chaim Frenkel
- Re: RFC 80 (v1): Exception objects and classes for ... Peter Scott
- Re: RFC 80 (v1): Exception objects and classes ... Jeremy Howard
- Re: RFC 80 (v1): Exception objects and classes ... Graham Barr
- Re: RFC 80 (v1): Exception objects and clas... John Porter
- Re: RFC 80 (v1): Exception objects and... Graham Barr
- Re: RFC 80 (v1): Exception objects and... John Porter
- Re: RFC 80 (v1): Exception objects and... Peter Scott