summaryrefslogtreecommitdiffstatshomepage
path: root/py/qstrdefs.h
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-12-06 14:29:09 +0200
committerDamien George <damien.p.george@gmail.com>2014-12-08 20:25:49 +0000
commit46c3ab20049af16e97863e90e5761fae329f872a (patch)
treecbe6230dcad6972d7d50c6d08c4e4c4da215abb1 /py/qstrdefs.h
parentd0caaadaeea48e8f76dca3125a2dea3465a58416 (diff)
downloadmicropython-46c3ab20049af16e97863e90e5761fae329f872a.tar.gz
micropython-46c3ab20049af16e97863e90e5761fae329f872a.zip
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/qstrdefs.h')
-rw-r--r--py/qstrdefs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/qstrdefs.h b/py/qstrdefs.h
index 449f44d3bc..f183c256fb 100644
--- a/py/qstrdefs.h
+++ b/py/qstrdefs.h
@@ -403,6 +403,7 @@ Q(version_info)
#if MICROPY_PY_SYS_MAXSIZE
Q(maxsize)
#endif
+Q(print_exception)
#endif
#if MICROPY_PY_STRUCT