Skip to content

Commit

Permalink
More exception info.
Browse files Browse the repository at this point in the history
  • Loading branch information
Russell Power committed Aug 19, 2013
1 parent 6b45c98 commit 3a4e427
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions src/falcon/reval.cc
Expand Up @@ -1767,8 +1767,24 @@ typedef SetupExcept SetupFinally;

struct RaiseVarArgs : public RegOpImpl<RegOp<3>, RaiseVarArgs > {
static void _eval(Evaluator* eval, RegisterFrame* frame, RegOp<3>& op, Register* registers) {
// Jump to the nearest exception handler.
throw RException();
PyObject* type;
PyObject* value;
PyObject* tb;
// Jump to the nearest exception handler.
type = LOAD_OBJ(op.reg[0]);
if (op.reg[1] != kInvalidRegister) {
value = LOAD_OBJ(op.reg[1]);
} else {
value = Py_None;
}

if (op.reg[2] != kInvalidRegister) {
tb = LOAD_OBJ(op.reg[2]);
} else {
tb = Py_None;
}

throw RException(type, value, tb);
}
};

Expand Down

0 comments on commit 3a4e427

Please sign in to comment.