What should happen when the assert message expression throws?
Dukc
ajieskola at gmail.com
Thu Dec 8 16:11:04 UTC 2022
On Friday, 25 November 2022 at 16:48:39 UTC, kdevel wrote:
>> I don't think the example above has a correct condition; so
>> let's focus on correct ones.
>
> The condition is false. That is what I want to discuss. My
> question is: What does that mean? Does it mean more than
> writing a comment
>
> // I solemnly swear a is zero.
>
"A is *always* zero when this line is passed by the program. I
have thought it through, and when I have tested it, it always has
been so. Therefore, if a ever is something else when the program
gets here, by definition I have no idea what is happening, and
what could have caused it. It follows I can say nothing what
would happen if you let this program to continue, so it must be
aborted *immediately*."
More information about the Digitalmars-d
mailing list