summaryrefslogtreecommitdiff
path: root/Include/pyerrors.h
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2021-10-23 00:13:46 +0100
committerGitHub <noreply@github.com>2021-10-23 00:13:46 +0100
commitf30ad65dbf3c6b1b5eec14dc954d65ef32327857 (patch)
tree410d8eb9335a1e405cbc7092e8f5a36e592ad712 /Include/pyerrors.h
parent4bc5473a42c5eae0928430930b897209492e849d (diff)
downloadcpython-git-f30ad65dbf3c6b1b5eec14dc954d65ef32327857.tar.gz
bpo-45292: [PEP 654] add the ExceptionGroup and BaseExceptionGroup classes (GH-28569)
Diffstat (limited to 'Include/pyerrors.h')
-rw-r--r--Include/pyerrors.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/pyerrors.h b/Include/pyerrors.h
index c6c443a2d7..77d791427d 100644
--- a/Include/pyerrors.h
+++ b/Include/pyerrors.h
@@ -60,11 +60,14 @@ PyAPI_FUNC(const char *) PyExceptionClass_Name(PyObject *);
#define PyExceptionInstance_Class(x) ((PyObject*)Py_TYPE(x))
+#define _PyBaseExceptionGroup_Check(x) \
+ PyObject_TypeCheck(x, (PyTypeObject *)PyExc_BaseExceptionGroup)
/* Predefined exceptions */
PyAPI_DATA(PyObject *) PyExc_BaseException;
PyAPI_DATA(PyObject *) PyExc_Exception;
+PyAPI_DATA(PyObject *) PyExc_BaseExceptionGroup;
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03050000
PyAPI_DATA(PyObject *) PyExc_StopAsyncIteration;
#endif