diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-03-26 19:17:20 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-03-26 19:29:36 +0200 |
commit | af1ae3039913785cc9a36d93a23e4bcca5ec83e7 (patch) | |
tree | 756221fdf410bdb99d47d5d6ef346b6e8e3ed3e5 /py/obj.h | |
parent | 38f0c607b0626ecee9cb2e4aefb25c3756232dab (diff) |
objexcept: Add mp_obj_exception_get_value() convenience function.
This gets "value" of exceptions in the sense as it's defined for
StopIteration.value (i.e. args[0] or None).
TODO: This really should be inline function.
Diffstat (limited to 'py/obj.h')
-rw-r--r-- | py/obj.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -313,6 +313,7 @@ bool mp_obj_is_exception_instance(mp_obj_t self_in); void mp_obj_exception_clear_traceback(mp_obj_t self_in); void mp_obj_exception_add_traceback(mp_obj_t self_in, qstr file, machine_uint_t line, qstr block); void mp_obj_exception_get_traceback(mp_obj_t self_in, machine_uint_t *n, machine_uint_t **values); +mp_obj_t mp_obj_exception_get_value(mp_obj_t self_in); // str extern const mp_obj_type_t str_type; |