10000 gh-102406: replace exception chaining by PEP-678 notes in codecs by iritkatriel · Pull Request #102407 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-102406: replace exception chaining by PEP-678 notes in codecs #102407

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 7 commits into from
Mar 21, 2023
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
8000
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add null check, just in case
  • Loading branch information
iritkatriel committed Mar 21, 2023
commit 3f0f6a20faadaad437c200cee97a1cc1e05cbb42
3 changes: 3 additions & 0 deletions Python/codecs.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,9 @@ add_note_to_codec_error(const char *operation,
const char *encoding)
{
PyObject *exc = PyErr_GetRaisedException();
if (exc == NULL) {
return;
}
PyObject *note = PyUnicode_FromFormat("%s with '%s' codec failed",
operation, encoding);
if (note == NULL) {
Expand Down
0