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 bcf98dd commit 4346e25Copy full SHA for 4346e25
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. *exc* may be ``NULL``,
503
+ in which case the current exception is cleared without setting a new one.
504
505
.. warning::
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