summaryrefslogtreecommitdiffstats
path: root/Include/pyerrors.h
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2023-02-08 09:31:12 (GMT)
committerGitHub <noreply@github.com>2023-02-08 09:31:12 (GMT)
commitfeec49c40736fc05626a183a8d14c4ebbea5ae28 (patch)
tree5af6110eca8c2a21a9f699b40a87e7567c603e98 /Include/pyerrors.h
parent027adf42cd85db41fee05b0a40d89ef822876c97 (diff)
downloadcpython-feec49c40736fc05626a183a8d14c4ebbea5ae28.zip
cpython-feec49c40736fc05626a183a8d14c4ebbea5ae28.tar.gz
cpython-feec49c40736fc05626a183a8d14c4ebbea5ae28.tar.bz2
GH-101578: Normalize the current exception (GH-101607)
* Make sure that the current exception is always normalized. * Remove redundant type and traceback fields for the current exception. * Add new API functions: PyErr_GetRaisedException, PyErr_SetRaisedException * Add new API functions: PyException_GetArgs, PyException_SetArgs
Diffstat (limited to 'Include/pyerrors.h')
-rw-r--r--Include/pyerrors.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Include/pyerrors.h b/Include/pyerrors.h
index d5ac6af..d089fa7 100644
--- a/Include/pyerrors.h
+++ b/Include/pyerrors.h
@@ -18,6 +18,8 @@ PyAPI_FUNC(PyObject *) PyErr_Occurred(void);
PyAPI_FUNC(void) PyErr_Clear(void);
PyAPI_FUNC(void) PyErr_Fetch(PyObject **, PyObject **, PyObject **);
PyAPI_FUNC(void) PyErr_Restore(PyObject *, PyObject *, PyObject *);
+PyAPI_FUNC(PyObject *) PyErr_GetRaisedException(void);
+PyAPI_FUNC(void) PyErr_SetRaisedException(PyObject *);
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030b0000
PyAPI_FUNC(PyObject*) PyErr_GetHandledException(void);
PyAPI_FUNC(void) PyErr_SetHandledException(PyObject *);
@@ -51,6 +53,10 @@ PyAPI_FUNC(void) PyException_SetCause(PyObject *, PyObject *);
PyAPI_FUNC(PyObject *) PyException_GetContext(PyObject *);
PyAPI_FUNC(void) PyException_SetContext(PyObject *, PyObject *);
+
+PyAPI_FUNC(PyObject *) PyException_GetArgs(PyObject *);
+PyAPI_FUNC(void) PyException_SetArgs(PyObject *, PyObject *);
+
/* */
#define PyExceptionClass_Check(x) \