diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-05-22 18:23:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-22 18:23:28 +0200 |
commit | a58db9628d0c96cc5b863137fed4e432238f8027 (patch) | |
tree | f47a49eb5b1d3f894bb118814857fe54fb5d975b /Doc | |
parent | d092caf096fa48baadfc0900792206bb5aa0192d (diff) | |
download | cpython-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.rst | 2 |
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 ================== |