scope(exit) without exception handling?

deadalnix deadalnix at gmail.com
Wed May 16 03:06:21 PDT 2012


Le 16/05/2012 11:59, Trass3r a écrit :
>>> 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

Except for thing throw by the runtime, which can basically occur at any 
moment.


More information about the Digitalmars-d mailing list