try/catch idiom in std.datetime

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Fri Nov 22 17:48:27 PST 2013


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




More information about the Digitalmars-d mailing list