assert(0)

Fyodor Ustinov via Digitalmars-d digitalmars-d at puremagic.com
Sat Nov 7 12:38:17 PST 2015


On Saturday, 7 November 2015 at 18:48:40 UTC, anonymous wrote:

> Asserts throw Errors, not Exceptions. You should generally not 
> catch Errors. That's just as dangerous without -release as with 
> it.

1. I should generally _not_, but I _can_.
2. Without "-release" assert(0) launches scope(exit), 
scope(failure) and "finally" blocks. I.e. we get a completely 
different behavior in "-release" and not "-release" mode.

WBR,
     Fyodor.


More information about the Digitalmars-d mailing list