That's quite nice actually. I still want a discussion on the exception object(s) and throwing / creating them, to know how handling of them would work. The only problem with the syntax is that it's not entirely "logical" that the exception area would be called when no exception is thrown. Also it's possibly also the "if/else" mightmare that I mentioned in my other post, which is more of an issue with the way exception types are identified.
/ David Hedbor
Previous text:
2003-10-01 20:51: Subject: Re: throw or return
How about:
try(Exception e) { catch { format(); }
if(e->foobar) { write_error_message(); break; } if(e->gazonk) { fatal_error(); } }
The point of this syntax would be that the exception is automatically re-thrown at the end of the try statement, unless a break is encountered, only then is the error discarded.
/ Fredrik (Naranek) Hubinette (Real Build Master)