Exception Handling, Scope and Destructor questions
Deewiant
deewiant.doesnotlike.spam at gmail.com
Tue Feb 13 10:20:50 PST 2007
Kirk McDonald wrote:
> orgoton wrote:
>> Lastly, the catch() does not need to have a scope, yes? something like
>> catch(Exception e) ProcessGeneric(); in summary of the code above?
>
> Yes, this is allowed.
>
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
More information about the Digitalmars-d-learn
mailing list