Skip to content

Commit

Permalink
Try clearing exception to set our own
Browse files Browse the repository at this point in the history
  • Loading branch information
juliannguyen4 committed Mar 26, 2024
1 parent 3de57c2 commit 43894b9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1282,6 +1282,8 @@ as_status call_py_callback(as_error *err, unsigned int py_listener_data_index,
Py_DECREF(py_args);
if (!py_result) {
// Python callback threw an exception
// But just ignore it and set our own exception
PyErr_Clear();
return as_error_update(
err, AEROSPIKE_ERR, "Python callback %s threw an exception",
py_listener_data[py_listener_data_index].listener_name);
Expand Down

0 comments on commit 43894b9

Please sign in to comment.