diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-04-25 03:17:41 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-04-25 03:49:23 +0300 |
commit | 8b85d14b92a65e92862861038c0fe96e6c616c3e (patch) | |
tree | 237c7a0bad20fb8a31944a6bc7bbc51a97689d3a /py/mpstate.h | |
parent | cf5b6f6974a1ca7d835803a744d1daae12876dac (diff) |
modsys: Add basic sys.exc_info() implementation.
The implementation is very basic and non-compliant and provided solely for
CPython compatibility. The function itself is bad Python2 heritage, its
usage is discouraged.
Diffstat (limited to 'py/mpstate.h')
-rw-r--r-- | py/mpstate.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/py/mpstate.h b/py/mpstate.h index a2366df7f..42593e4c4 100644 --- a/py/mpstate.h +++ b/py/mpstate.h @@ -107,6 +107,11 @@ typedef struct _mp_state_vm_t { // pending exception object (MP_OBJ_NULL if not pending) mp_obj_t mp_pending_exception; + // current exception being handled, for sys.exc_info() + #if MICROPY_PY_SYS_EXC_INFO + mp_obj_t cur_exception; + #endif + // dictionary for the __main__ module mp_obj_dict_t dict_main; |