[Issue 8135] throwing Error runs finally handler

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed May 23 19:39:07 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8135



--- Comment #2 from dawg at dawgfoto.de 2012-05-23 19:40:45 PDT ---
>The current implementation _does_ always execute finally blocks, scope statements, and destructors with Errors just like would occur with Exceptions

No they are not when you throw from a nothrow function.
This is even worse when nothrow is inferred, because the
actual behavior becomes instable.

>So, the short answer is that you should never rely on scope statements, finally blocks, or destructors being run or not run when an Error is thrown.

This is not an acceptable solution. The problem needs a clean decision and an
according implementation or it will continue to create confusion.
https://github.com/D-Programming-Language/druntime/pull/225#issuecomment-5857155

I'm wondering how the decision to use EH for fatal errors was made.

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


More information about the Digitalmars-d-bugs mailing list