https://issues.dlang.org/show_bug.cgi?id=19602

Mathias LANG <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
           Severity|critical                    |normal

--- Comment #2 from Mathias LANG <[email protected]> ---
This behavior is documented in the language specs since the very beginning of
D2.

In fact, there is currently a bug opened by Walter because dtors and `scope`
statements are executed: https://issues.dlang.org/show_bug.cgi?id=17494
In addition, there is a PR to fix said issue:
https://github.com/dlang/dmd/pull/6896

There is still value in catching `Error` though: as a last resort mesure:
catch, log & abort is one thing, and catching at the top of a thread/fiber to
avoid the program termination is another.

Note that if `nothrow` applied to Error, the attribute would be essentially
useless: `assert`, `new`, `switch`, slice casts and many other things could not
be `nothrow`.

--

Reply via email to