Exception Handling, Scope and Destructor questions

Jarrett Billingsley kb3ctd2 at yahoo.com
Tue Feb 13 14:39:28 PST 2007


"Deewiant" <deewiant.doesnotlike.spam at gmail.com> wrote in message 
news:eqsvi1$8uv$1 at digitalmars.com...
> Incorrect. try doesn't need it, but catch does, and I would expect finally 
> to,
> as well.
>
> try foo();
> catch bar(); // doesn't work
>
> try foo();
> catch { bar(); } // fine

This works:

try
    foo();
catch(Object o) // notice you have to put an exception name here
    bar();
finally
    baz(); 




More information about the Digitalmars-d-learn mailing list