diff options
| author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-12-06 14:29:09 +0200 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2014-12-08 20:25:49 +0000 |
| commit | 46c3ab20049af16e97863e90e5761fae329f872a (patch) | |
| tree | cbe6230dcad6972d7d50c6d08c4e4c4da215abb1 /py/obj.h | |
| parent | d0caaadaeea48e8f76dca3125a2dea3465a58416 (diff) | |
modsys: Add sys.print_exception(exc, file=sys.stdout) function.
The function is modeled after traceback.print_exception(), but unbloated,
and put into existing module to save overhead on adding another module.
Compliant traceback.print_exception() is intended to be implemented in
micropython-lib in terms of sys.print_exception().
This change required refactoring mp_obj_print_exception() to take pfenv_t
interface arguments.
Addresses #751.
Diffstat (limited to 'py/obj.h')
| -rw-r--r-- | py/obj.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -418,7 +418,7 @@ mp_obj_t mp_instance_cast_to_native_base(mp_const_obj_t self_in, mp_const_obj_t void mp_obj_print_helper(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t o_in, mp_print_kind_t kind); void mp_obj_print(mp_obj_t o, mp_print_kind_t kind); -void mp_obj_print_exception(mp_obj_t exc); +void mp_obj_print_exception(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t exc); bool mp_obj_is_true(mp_obj_t arg); |
