Exemplo n.º 1
0
 // Used when we may need to register an error (for convenience like a macro)
 public void ASSERT_ERR(bool condition, VMErrorType err_type, string msg = null)
 {
     if (condition)
     {
         push_err(err_type, msg);
     }
 }
Exemplo n.º 2
0
        // Push an error to the cores' error handler
        public void push_err(VMErrorType err_type, string msg = null)
        {
            VMError err = new VMError(VM.state, err_type, msg);

            // Register the error with the handler
            VM.state.err_handler.register_err(err);
            VM.state.had_err = true;
            throw new VMErrException(err);
        }
Exemplo n.º 3
0
 public VMError(VMState state, VMErrorType type, string msg = null)
 {
     this.state = state;
     this.type  = type;
     this.msg   = msg;
 }