assert(0)

anonymous via Digitalmars-d digitalmars-d at puremagic.com
Sat Nov 7 10:48:40 PST 2015


On 07.11.2015 19:42, Fyodor Ustinov wrote:
> Well. assert(0) located in very-very dangerous place. If we suddenly got
> to this place - Program should die immediately, otherwise there will be
> something terrible.
>
> But without "-release" this place less dangerous? Why without "-release"
> this assert behaves like any other (throw exception and we can cath it,
> for example)?

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


More information about the Digitalmars-d mailing list