[Issue 11542] scope(failure) messes up nothrow checking

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Nov 18 10:13:14 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11542



--- Comment #1 from Andrei Alexandrescu <andrei at erdani.com> 2013-11-18 10:13:13 PST ---
To wit, this should work under the new semantics:

void fun() nothrow
{
    scope(failure) { throw new Error("wowzers"); }
    throw new Exception("so sue me");
}

This is because nothrow functions may still throw Error. This should work as
well:

void fun() nothrow
{
    scope(failure) assert(0);
    throw new Exception("so sue me");
}

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list