http://d.puremagic.com/issues/show_bug.cgi?id=8675
Summary: Nothrow can't throw Errors Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: monarchdo...@gmail.com --- Comment #0 from monarchdo...@gmail.com 2012-09-17 02:38:12 PDT --- A nothrow function will refuse an explicit call to "throw Error": nothrow void foo() { assert(1, "Some error"); assert(0, "Some error"); } //This is fine nothrow void bar() { throw new Error("Some error"); } //This is NOT fine Error: object.Error is thrown but not caught Error: function main.bar 'bar' is nothrow yet may throw nothrow void baz() { try { throw new Error("Some error"); } catch(Exception) { } } //This works though (!) //Obviously, the "Error" is not caught... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------