Skip to content

Commit

Permalink
Merge pull request #69 from mbachry/fix-exc-handling
Browse files Browse the repository at this point in the history
Fix crash during exception handling
  • Loading branch information
luss authored Jan 17, 2025
2 parents 619961b + a4e5bd1 commit db1a34e
Showing 1 changed file with 2 additions and 0 deletions.
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

0 comments on commit db1a34e

Please # to comment.