mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
gh-108082: C API: Add tests for PyErr_WriteUnraisable() (GH-111455)
Also document the behavior when called with NULL.
This commit is contained in:
parent
8eaa206fec
commit
bca3305429
3 changed files with 70 additions and 0 deletions
|
|
@ -88,9 +88,17 @@ Printing and clearing
|
|||
The function is called with a single argument *obj* that identifies the context
|
||||
in which the unraisable exception occurred. If possible,
|
||||
the repr of *obj* will be printed in the warning message.
|
||||
If *obj* is ``NULL``, only the traceback is printed.
|
||||
|
||||
An exception must be set when calling this function.
|
||||
|
||||
.. versionchanged:: 3.4
|
||||
Print a traceback. Print only traceback if *obj* is ``NULL``.
|
||||
|
||||
.. versionchanged:: 3.8
|
||||
Use :func:`sys.unraisablehook`.
|
||||
|
||||
|
||||
.. c:function:: void PyErr_DisplayException(PyObject *exc)
|
||||
|
||||
Print the standard traceback display of ``exc`` to ``sys.stderr``, including
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue