diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-02-10 19:43:41 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-02-11 02:28:36 +0200 |
commit | 4e836fb4ea3aca143604d156c982d4f8c00fbd5b (patch) | |
tree | 7d281a7f2ceb724ba5720270ab4adb94d9aa2efa /py | |
parent | 0a25aba046aece74d2ac3bad7e2e315eb90bd2dd (diff) | |
download | micropython-4e836fb4ea3aca143604d156c982d4f8c00fbd5b.tar.gz micropython-4e836fb4ea3aca143604d156c982d4f8c00fbd5b.zip |
mp_obj_equal(): Instead of assert(), throw NotImplementedError.
With a nice traceback, helps debugging much better.
Diffstat (limited to 'py')
-rw-r--r-- | py/obj.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -132,9 +132,9 @@ bool mp_obj_equal(mp_obj_t o1, mp_obj_t o2) { 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)); - assert(0); + + nlr_jump(mp_obj_new_exception_msg_varg(MP_QSTR_NotImplementedError, + "Equality for '%s' and '%s' types not yet implemented", mp_obj_get_type_str(o1), mp_obj_get_type_str(o2))); return false; } } |