try/catch idiom in std.datetime

Marco Leise Marco.Leise at gmx.de
Mon Nov 18 09:32:51 PST 2013


Am Tue, 19 Nov 2013 04:00:56 +1100
schrieb "Daniel Murphy" <yebblies at nospamgmail.com>:

> "Andrei Alexandrescu" <SeeWebsiteForEmail at erdani.org> wrote in message 
> news:l6d9ki$ok6$1 at digitalmars.com...
> >
> > Currently it looks like the presence of scope(failure) simply makes the 
> > function seem legit, no matter what.
> >
> > void fun() nothrow
> > {
> >    scope(failure) {}
> >    throw new Exception("so sue me");
> > }
> >
> 
> Yes, obviously a bug.  The compiler is missing the rethrow.

That's severe. It's not even a rethrow, but an independent
throw statement sitting squarely in a nothrow function.

-- 
Marco



More information about the Digitalmars-d mailing list