Skip to content

gh-146563: add exception note for invalid Expat handler return values#146565

Open
picnixz wants to merge 6 commits intopython:mainfrom
picnixz:feat/expat/better-error-notes-146563
Open

gh-146563: add exception note for invalid Expat handler return values#146565
picnixz wants to merge 6 commits intopython:mainfrom
picnixz:feat/expat/better-error-notes-146563

Conversation

@picnixz
Copy link
Copy Markdown
Member

@picnixz picnixz commented Mar 28, 2026

@picnixz picnixz requested a review from encukou March 29, 2026 12:24
@picnixz picnixz requested a review from encukou April 11, 2026 10:09
{
PyObject *exc = PyErr_GetRaisedException();
assert(exc != NULL);
PyObject *note = PyUnicode_FromFormat("invalid '%s' event handler return value", name);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@encukou Do you have a better wording for this? maybe we should say "expecting X and not Y" ? as it's invoked from a macro I can add more arguments if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants