(I'm not quite in favour. But assuming this flys...)
Why not use Damien's switch syntax. Much more powerful and the flow
is better controlled.
And why add another keyword. Just extend eval{} to accept two blocks.
eval {
}
catch {
}
finally {
}
With the catch block setting the lexical $@ to the exception.
Though, I'm sure that Larry will come up with a better synonym.
<chaim>
>>>>> "JP" == John Porter <[EMAIL PROTECTED]> writes:
JP> Peter Scott <[EMAIL PROTECTED]>:
>>
>> try {
>> # fragile code
>> } catch Exception::IO with {
>> # handle IO exceptions
>> } catch Exception::Socket with {
>> # handle network exceptions
>> } otherwise {
>> # handle other exceptions
>> };
JP> I'd like to recommend just "catch" instead of "otherwise",
JP> because sometimes you'll do this:
JP> try {
JP> # fragile code
JP> }
JP> catch {
JP> # handle other exceptions
JP> };
JP> And it would look silly to use "otherwise" there.
JP> You could make it so "catch" takes a list of 0 or more exception
JP> class names.
JP> --
JP> John Porter
--
Chaim Frenkel Nonlinear Knowledge, Inc.
[EMAIL PROTECTED] +1-718-236-0183