We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be6f920 commit 3cefb64Copy full SHA for 3cefb64
1 file changed
Doc/c-api/exceptions.rst
@@ -499,12 +499,12 @@ Querying the error indicator
499
.. c:function:: void PyErr_SetRaisedException(PyObject *exc)
500
501
Set *exc* as the exception currently being raised,
502
- clearing the existing exception if one is set.
+ clearing the existing exception if one is set. If *exc* is ``NULL``,
503
+ just clear the existing exception.
504
- .. warning::
505
+ *exc* must be a valid exception or ``NULL``.
506
- This call ":term:`steals <steal>`" a reference to *exc*,
507
- which must be a valid exception.
+ This call ":term:`steals <steal>`" a reference to *exc*.
508
509
.. versionadded:: 3.12
510
0 commit comments