try/catch idiom in std.datetime

growler growlercab at gmail.com
Fri Nov 22 17:52:19 PST 2013


On Saturday, 23 November 2013 at 01:48:28 UTC, Andrei 
Alexandrescu wrote:
> On 11/22/13 5:37 PM, growler wrote:
>> On Friday, 22 November 2013 at 21:48:14 UTC, Shammah 
>> Chancellor wrote:
>>
>> [snip]
>>>
>>> No.  scope(failure) is supposed to re-throw the exception.
>>
>> Where does it say that?
>>
>> http://dlang.org/statement.html#ScopeGuardStatement
>>
>> "... scope(failure) executes NonEmptyOrScopeBlockStatement 
>> when the
>> scope exits due to exception unwinding. ..."
>
> It's implied. The scope is already being exited by means of an 
> exception. If scope(failure) changed anything, _that_ would 
> have been documented.
>
> Anyhow we can be clearer in the docs.
>
>
> Andrei

I stand corrected, cheers.


More information about the Digitalmars-d mailing list