Skip to content

Commit 4346e25

Browse files
committed
Document that PyErr_SetRaisedException accepts null
1 parent bcf98dd commit 4346e25

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Doc/c-api/exceptions.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -499,12 +499,12 @@ Querying the error indicator
499499
.. c:function:: void PyErr_SetRaisedException(PyObject *exc)
500500
501501
Set *exc* as the exception currently being raised,
502-
clearing the existing exception if one is set.
502+
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.
503504
504505
.. warning::
505506
506-
This call ":term:`steals <steal>`" a reference to *exc*,
507-
which must be a valid exception.
507+
This call ":term:`steals <steal>`" a reference to *exc*.
508508
509509
.. versionadded:: 3.12
510510

0 commit comments

Comments
 (0)