X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbindings%2Fpython%2Fbt2%2Fbt2%2Fnative_bt_component_class.i.h;fp=src%2Fbindings%2Fpython%2Fbt2%2Fbt2%2Fnative_bt_component_class.i.h;h=a80d059d052b7964d16d4f48ea4933053ca1d57a;hb=981f33ddf743a4f38b959afb7afe66083ce0ed76;hp=23e7d06a0dbcc5f1c831fa7b1bff588f490c2ef7;hpb=64961f8b6306c567fd2683d19a1bdee1331a8d5b;p=babeltrace.git diff --git a/src/bindings/python/bt2/bt2/native_bt_component_class.i.h b/src/bindings/python/bt2/bt2/native_bt_component_class.i.h index 23e7d06a..a80d059d 100644 --- a/src/bindings/python/bt2/bt2/native_bt_component_class.i.h +++ b/src/bindings/python/bt2/bt2/native_bt_component_class.i.h @@ -505,16 +505,15 @@ void component_class_finalize(bt_self_component *self_component) bt_logging_level log_level = get_self_component_log_level( self_component); - BT_COMP_LOG_CUR_LVL(BT_LOG_WARNING, log_level, self_component, - "User component's _user_finalize() method raised an exception: ignoring:"); - logw_exception(log_level); - /* * Ignore any exception raised by the _user_finalize() method * because it won't change anything at this point: the component * is being destroyed anyway. */ - PyErr_Clear(); + BT_COMP_LOG_CUR_LVL(BT_LOG_WARNING, log_level, self_component, + "User component's _user_finalize() method raised an exception: ignoring:"); + logw_exception_clear(log_level); + goto end; } @@ -1181,17 +1180,15 @@ void component_class_message_iterator_finalize( bt_logging_level log_level = get_self_component_log_level( self_comp); - BT_COMP_LOG_CUR_LVL(BT_LOG_WARNING, log_level, self_comp, - "User's _user_finalize() method raised an exception: ignoring:"); - logw_exception(get_self_message_iterator_log_level( - message_iterator)); - /* * Ignore any exception raised by the _user_finalize() method * because it won't change anything at this point: the component * is being destroyed anyway. */ - PyErr_Clear(); + BT_COMP_LOG_CUR_LVL(BT_LOG_WARNING, log_level, self_comp, + "User's _user_finalize() method raised an exception: ignoring:"); + logw_exception_clear(get_self_message_iterator_log_level( + message_iterator)); } Py_XDECREF(py_method_result);