Assertions getting corrupted

Shachar Shemesh shachar at weka.io
Thu Oct 26 08:17:40 UTC 2017


On 26/10/17 09:32, Johan Engelen wrote:
> Destructors will have the same problem, right?
> It seems to me that the cause of the problem is that `assert` throws 
> instead of aborting execution right there.
> 
> -Johan

And, indeed, my solution in the specific case that triggered this post 
was to switch from "assert" to "ASSERT", our own internal 
implementation. Here's a snippet from it:

     version(unittest ){
         throw new AssertError("Assertion failure", file, line);
     }
     else {
         DIE("Assertion failure", file, line);
     }


More information about the Digitalmars-d mailing list