diff options
author | Georg Brandl <georg@python.org> | 2009-02-05 11:23:47 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-02-05 11:23:47 (GMT) |
commit | 3ceebd2ca778f066b563542e98bc79d1b8c3b0e0 (patch) | |
tree | 08feba3855a458674ee5c2f97cdfc20ce4345b67 /Doc | |
parent | b21c75beab3d78b9ba28d19f5b9fedfe84688ace (diff) | |
download | cpython-3ceebd2ca778f066b563542e98bc79d1b8c3b0e0.zip cpython-3ceebd2ca778f066b563542e98bc79d1b8c3b0e0.tar.gz cpython-3ceebd2ca778f066b563542e98bc79d1b8c3b0e0.tar.bz2 |
PyErr_PrintEx is also in 2.x...
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/c-api/exceptions.rst | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst index 1cdce3f..4482cd0 100644 --- a/Doc/c-api/exceptions.rst +++ b/Doc/c-api/exceptions.rst @@ -41,12 +41,21 @@ is a separate error indicator for each thread. Either alphabetical or some kind of structure. -.. cfunction:: void PyErr_Print() +.. cfunction:: void PyErr_PrintEx(int set_sys_last_vars) Print a standard traceback to ``sys.stderr`` and clear the error indicator. Call this function only when the error indicator is set. (Otherwise it will cause a fatal error!) + If *set_sys_last_vars* is nonzero, the variables :data:`sys.last_type`, + :data:`sys.last_value` and :data:`sys.last_traceback` will be set to the + type, value and traceback of the printed exception, respectively. + + +.. cfunction:: void PyErr_Print() + + Alias for ``PyErr_PrintEx(1)``. + .. cfunction:: PyObject* PyErr_Occurred() |