Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix crash during exception handling #69

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Changes from all commits
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
2 changes: 2 additions & 0 deletions src/errors.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ errorCheck()
// and detail, and log it to Postgres. These exceptions are generated in utils.py to intercept ERROR/FATAL log
// messages. So, first detect whether that's the case, and call a new reporting function...
PyObject *is_multicorn_exception = PyObject_GetAttrString(pErrValue, "_is_multicorn_exception");
// clear AttributeError possibly raised by PyObject_GetAttrString
PyErr_Clear();
if (is_multicorn_exception != NULL && PyObject_IsTrue(is_multicorn_exception))
{
Py_DECREF(is_multicorn_exception);
Expand Down