[Issue 17226] Exception during the generation of an assert message hides AssertError

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Nov 20 17:50:56 UTC 2022


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

--- Comment #10 from Ali Cehreli <acehreli at yahoo.com> ---
(In reply to Paul Backus from comment #7)

> if the message expression throws, the assert's condition is never
> evaluated, and the program does not enter an invalid state.

Wait a minute... :) It shouldn't be the assert expression itself that puts the
program into invalid state. assert throws because the program is already in an
invalid state. Removing the evaluation of the assert expression does not change
that fact.

If we accept that point, then even attempting to evaluate the assert expression
is best-effort when the program is in an invalid state.

That and my earlier observation about attempting to dump call stack proves we
are already in a best-effort business when the program is in invalid state.

--


More information about the Digitalmars-d-bugs mailing list