File, line and message for assert(0)?

simendsjo simen.endsjo at pandavre.com
Sat May 28 08:41:11 PDT 2011


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

void main() {
     f();
}


object.Error: assert(0) or HLT instruction
----------------
assert_release.d(8): _Dmain
----------------

Is it possible to get file, line and message for assert(0)?


More information about the Digitalmars-d-learn mailing list