From: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Date: Sun, 31 Dec 2023 23:16:33 +0000 (+0000) Subject: gh-101578: [doc] mention that PyErr_GetRaisedException returns NULL when the error... X-Git-Tag: v3.13.0a3~222 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2849cbb53afc8c6a4465f1b3490c67c2455caf6f;p=thirdparty%2FPython%2Fcpython.git gh-101578: [doc] mention that PyErr_GetRaisedException returns NULL when the error indicator is not set (#113369) --- diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst index 284a9c71e420..c7e3cd9463e5 100644 --- a/Doc/c-api/exceptions.rst +++ b/Doc/c-api/exceptions.rst @@ -440,7 +440,7 @@ Querying the error indicator .. c:function:: PyObject *PyErr_GetRaisedException(void) Return the exception currently being raised, clearing the error indicator at - the same time. + the same time. Return ``NULL`` if the error indicator is not set. This function is used by code that needs to catch exceptions, or code that needs to save and restore the error indicator temporarily.