summaryrefslogtreecommitdiff
path: root/Doc
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-05-22 18:23:28 +0200
committerGitHub <noreply@github.com>2019-05-22 18:23:28 +0200
commita58db9628d0c96cc5b863137fed4e432238f8027 (patch)
treef47a49eb5b1d3f894bb118814857fe54fb5d975b /Doc
parentd092caf096fa48baadfc0900792206bb5aa0192d (diff)
downloadcpython-git-a58db9628d0c96cc5b863137fed4e432238f8027.tar.gz
bpo-36829: Enhance PyErr_WriteUnraisable() (GH-13487)
PyErr_WriteUnraisable() now displays the exception even if displaying the traceback failed. Moreover, hold a strong reference to sys.stderr while using it. Document that an exception must be set when calling PyErr_WriteUnraisable(), but don't add an assertion to check it at runtime. Cleanup: use longer names for variables and create write_unraisable_exc_file() subfunction.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/c-api/exceptions.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst
index cd06096ef7..79e6f97a44 100644
--- a/Doc/c-api/exceptions.rst
+++ b/Doc/c-api/exceptions.rst
@@ -81,6 +81,8 @@ Printing and clearing
in which the unraisable exception occurred. If possible,
the repr of *obj* will be printed in the warning message.
+ An exception must be set when calling this function.
+
Raising exceptions
==================