[Issue 13501] [REG2.052] Crash with throwing in scope(failure) after throwing in scope(success)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Nov 8 06:10:51 UTC 2020


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

Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla at digitalmars.com

--- Comment #5 from Walter Bright <bugzilla at digitalmars.com> ---
Throwing inside the scope statement is what's called a "double fault
exception". In C++, doing such aborts the program. Andrei proposed extending D
to handle this with "exception chaining" and Don Clugston implemented it.

Unfortunately, exception chaining turns out to be very confusing in its
semantics. Worse, it doesn't fit in well with the exception unwinding schemes
we'd like D to fit in with.

The spec is correct here, and the compiler should deprecate throwing in the
scope statement.

--


More information about the Digitalmars-d-bugs mailing list