]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-101578: [doc] mention that PyErr_GetRaisedException returns NULL when the...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 31 Dec 2023 23:22:55 +0000 (00:22 +0100)
committerGitHub <noreply@github.com>
Sun, 31 Dec 2023 23:22:55 +0000 (23:22 +0000)
gh-101578: [doc] mention that PyErr_GetRaisedException returns NULL when the error indicator is not set (GH-113369)
(cherry picked from commit 2849cbb53afc8c6a4465f1b3490c67c2455caf6f)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Doc/c-api/exceptions.rst

index d5119789a5f6233962003814f4a59df1ea0e090f..39408641c8a52e1b24b006de4f84f4922615c239 100644 (file)
@@ -427,7 +427,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.