[Python-checkins] r69292 - python/branches/py3k/Doc/c-api/exceptions.rst

georg.brandl python-checkins at python.org
Thu Feb 5 11:56:37 CET 2009


Author: georg.brandl
Date: Thu Feb 5 11:56:37 2009
New Revision: 69292
Log:
#5096: document PyErr_PrintEx().
Modified:
 python/branches/py3k/Doc/c-api/exceptions.rst
Modified: python/branches/py3k/Doc/c-api/exceptions.rst
==============================================================================
--- python/branches/py3k/Doc/c-api/exceptions.rst	(original)
+++ python/branches/py3k/Doc/c-api/exceptions.rst	Thu Feb 5 11:56:37 2009
@@ -35,12 +35,21 @@
 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()
 


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /