}
if (method) {
+ const struct bt_error *saved_error;
+
+ saved_error = bt_current_thread_take_error();
+
BT_LIB_LOGI("Calling user's component finalization method: "
"%![comp-]+c", comp);
method(comp);
+ BT_ASSERT_POST_NO_ERROR();
+
+ if (saved_error) {
+ BT_CURRENT_THREAD_MOVE_ERROR_AND_RESET(saved_error);
+ }
}
}
status == BT_FUNC_STATUS_MEMORY_ERROR,
"Unexpected returned component status: status=%s",
bt_common_func_status_string(status));
+ BT_ASSERT_POST_NO_ERROR_IF_NO_ERROR_STATUS(status);
}
return status;