-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add PyErr_GetActiveException and PyErr_SetActiveException #90501
Comments
Following the removal of exc_type and exc_traceback from the interpreter's active exception in bpo-45711, we can now provide simplified get-set functions in the C Api: PyAPI_FUNC(void) PyErr_GetActiveException(PyObject **);
PyAPI_FUNC(void) PyErr_SetActiveException(PyObject *); as alternatives to PyAPI_FUNC(void) PyErr_GetExcInfo(PyObject **, PyObject **, PyObject **);
PyAPI_FUNC(void) PyErr_SetExcInfo(PyObject *, PyObject *, PyObject *); See also bpo-46328 re the corresponding change in the sys module. |
Why not |
Yes, you’re right of course ;) |
I have a side question. Is there a plan to update generators somehow to accept the exception value only? |
We should make throw accept an exception instance, the same thing was done in the traceback module. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: