File, line and message for assert(0)?

Andrej Mitrovic andrej.mitrovich at gmail.com
Sat May 28 09:32:33 PDT 2011


FTFY:

import std.exception;
void f() {
   // much code with many assert(0)
   enforce(0, "where's my message, line and file?");
   // much code with many assert(0)
}

void main() {
   f();
}

But the two are supposed to be used for different things.


More information about the Digitalmars-d-learn mailing list