Perhaps you could make it look like a switch block (although fall through behaviour isn't ideal, in particular not when you introduce the label "finally :", so perhaps one shouldn't use "case" for this).
try { ... some code ... } catch (Exception e) { case invalid_file_system_type: ... break; case no_permission: case not_mounted: ... break; default: ... finally: ... }
I was trying to figure out if we have any current language constructs that takes two blocks of code, and the only I could think of was if () { ... } else { ... }.
/ Niels Möller (igelkottsräddare)
Previous text:
2003-10-01 18:18: Subject: Re: throw or return
All the proposed syntaxes are easy to tell apart from the current catch expression, at least. But I guess you mean that "try" should be "catch" instead and some other keyword should be used for the catch clauses. I can't figure out any good keyword for that, though. Furthermore it would be more difficult to tell the old-style and new-style syntaxes apart if both began with the same keyword.
/ Martin Stjernholm, Roxen IS