diff options
author | Georg Brandl <georg@python.org> | 2009-02-05 10:56:37 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-02-05 10:56:37 (GMT) |
commit | 115fb350fae25b6e7145cd5ab14fe458f5d1b6af (patch) | |
tree | bbea568ab0e9dcdb2d6a596f4bcf8cb1cf543f06 /Doc | |
parent | f3048e5b9600e24f2c16eeef48695f3e706133c7 (diff) | |
download | cpython-115fb350fae25b6e7145cd5ab14fe458f5d1b6af.zip cpython-115fb350fae25b6e7145cd5ab14fe458f5d1b6af.tar.gz cpython-115fb350fae25b6e7145cd5ab14fe458f5d1b6af.tar.bz2 |
#5096: document PyErr_PrintEx().
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 3fb6e56..5355132 100644 --- a/Doc/c-api/exceptions.rst +++ b/Doc/c-api/exceptions.rst @@ -35,12 +35,21 @@ in various ways. There 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() |