8000 gh-111375: Use `NULL` in the exception stack to indicate an exception was handled by pR0Ps · Pull Request #113302 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-111375: Use NULL in the exception stack to indicate an exception was handled #113302

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

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Don't skip over Py_None when getting the topmost exception
  • Loading branch information
pR0Ps committed Dec 20, 2023
commit 4ac01c0b8c999b58b799d8ccfc659eb196bae2e3
3 changes: 1 addition & 2 deletions Python/errors.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@ _PyErr_GetTopmostException(PyThreadState *tstate)
_PyErr_StackItem *exc_info = tstate->exc_info;
assert(exc_info);

while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
exc_info->previous_item != NULL)
while (exc_info->exc_value == NULL && exc_info->previous_item != NULL)
{
exc_info = exc_info->previous_item;
}
Expand Down
0