scope(exit) without exception handling?

Trass3r un at known.com
Wed May 16 02:59:25 PDT 2012


>> scope(exit) stuff;
>> otherStuff;
>>
>> is lowered to something like
>>
>> try
>> {
>>     otherStuff;
>> }
>> finally
>> {
>>     stuff;
>> }
>>
> And if otherStuff is marked all nothrow, then the exception parts are  
> pulled out.  It's pretty much the entire point of
> having nothrow annotations.

This should be added to
http://dlang.org/function.html#nothrow-functions


More information about the Digitalmars-d mailing list