object.error: Privileged Instruction

simendsjo simendsjo at gmail.com
Sat Sep 22 11:33:40 PDT 2012


What does the message in the subject mean?

Here's a testcase (tested on dmd 2.060 on win7 32-bit):

import core.exception;
import core.runtime; // comment out this, and no stacktrace is 
printed

void myAssertHandler(string file, size_t line, string msg = null) 
{ }

static this() {
     setAssertHandler(&myAssertHandler);
     f();
}

version(unittest) {
     void f() {
         //assert(false); // without message, object.error: 
Breakpoint
         assert(false, "aoeu"); // with message, object.error: 
Privileged Instruction
     }
}



More information about the Digitalmars-d-learn mailing list