Skip to content

Commit 74dcc6d

Browse files
author
georg.brandl
committed
PyErr_PrintEx is also in 2.x...
git-svn-id: http://svn.python.org/projects/python/trunk@69295 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 2634a10 commit 74dcc6d

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Doc/c-api/exceptions.rst

+10-1
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,21 @@ is a separate error indicator for each thread.
4141
Either alphabetical or some kind of structure.
4242
4343
44-
.. cfunction:: void PyErr_Print()
44+
.. cfunction:: void PyErr_PrintEx(int set_sys_last_vars)
4545

4646
Print a standard traceback to ``sys.stderr`` and clear the error indicator.
4747
Call this function only when the error indicator is set. (Otherwise it will
4848
cause a fatal error!)
4949

50+
If *set_sys_last_vars* is nonzero, the variables :data:`sys.last_type`,
51+
:data:`sys.last_value` and :data:`sys.last_traceback` will be set to the
52+
type, value and traceback of the printed exception, respectively.
53+
54+
55+
.. cfunction:: void PyErr_Print()
56+
57+
Alias for ``PyErr_PrintEx(1)``.
58+
5059

5160
.. cfunction:: PyObject* PyErr_Occurred()
5261

0 commit comments

Comments
 (0)