mp_obj_equal(): Instead of assert(), throw NotImplementedError.
With a nice traceback, helps debugging much better.
This commit is contained in:
parent
0a25aba046
commit
4e836fb4ea
6
py/obj.c
6
py/obj.c
|
@ -132,9 +132,9 @@ bool mp_obj_equal(mp_obj_t o1, mp_obj_t o2) {
|
||||||
return r == mp_const_true ? true : false;
|
return r == mp_const_true ? true : false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO: Debugging helper
|
|
||||||
printf("Equality for '%s' and '%s' types not yet implemented\n", mp_obj_get_type_str(o1), mp_obj_get_type_str(o2));
|
nlr_jump(mp_obj_new_exception_msg_varg(MP_QSTR_NotImplementedError,
|
||||||
assert(0);
|
"Equality for '%s' and '%s' types not yet implemented", mp_obj_get_type_str(o1), mp_obj_get_type_str(o2)));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue