digitalmars.D.bugs - [Issue 8675] New: Nothrow can't throw Errors
- d-bugmail puremagic.com (42/42) Sep 17 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8675
- d-bugmail puremagic.com (13/13) Sep 18 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8675
- d-bugmail puremagic.com (10/10) Sep 18 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8675
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: nobody puremagic.com ReportedBy: monarchdodra gmail.com --- Comment #0 from monarchdodra 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: -------
Sep 17 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8675 --- Comment #1 from github-bugzilla puremagic.com 2012-09-18 12:07:24 PDT --- Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/d77b7c2bf456e99495d8a6644a6304995d1a3b20 fix Issue 8675 - Nothrow can't throw Errors - fixed by checking whether the thrown exception is derived from Error before complaining about uncaught throws https://github.com/D-Programming-Language/dmd/commit/fb733a0f5fc9fa49ee58fcf7a19ca8e35d2e98bc Merge pull request #1125 from dawgfoto/fix8675 fix Issue 8675 - Nothrow can't throw Errors -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 18 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8675 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 18 2012