Commit 682f9e63 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

vm: Make sure that exception triple is <type, instance, traceback>.

This reduntant triple is one of the ugliest parts of Python, which they
chickened out to fix in Python3. We really should consider passing just
as single exception instance (without breaking Python-level APIs of course),
but until we do, let's follow CPython layout.
parent 4fff26a3
......@@ -415,8 +415,8 @@ unwind_jump:
// if TOS is None, just pops it and continues
// if TOS is an integer, does something else
// else error
if (mp_obj_is_exception_instance(TOP())) {
if (mp_obj_is_exception_type(TOP())) {
if (TOP() == mp_const_none) {
......@@ -716,7 +716,7 @@ unwind_return:
// push(traceback, exc-val, exc-type)
PUSH(nlr.ret_val); // TODO should be type(nlr.ret_val), I think...
} else {
// propagate exception to higher level
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment