SWIGTYPE_p_bt_trace, 0);
if (!py_trace_ptr) {
BT_LOGF_STR("Failed to create a SWIG pointer object.");
- abort();
+ bt_common_abort();
}
py_res = PyObject_CallFunction(py_callable, "(O)", py_trace_ptr);
- if (py_res) {
- BT_ASSERT(py_res == Py_None);
- } else {
- loge_exception_append_cause(
- "Trace's destruction listener (Python)",
- BT_LOG_OUTPUT_LEVEL);
+ if (!py_res) {
+ logw_exception_clear(BT_LOG_OUTPUT_LEVEL);
+ goto end;
}
+ BT_ASSERT(py_res == Py_None);
+
+end:
Py_DECREF(py_trace_ptr);
Py_XDECREF(py_res);
}