#include "lib/assert-pre.h"
#include "lib/assert-post.h"
#include <babeltrace2/graph/self-component.h>
-#include <babeltrace2/graph/component-const.h>
-#include <babeltrace2/graph/component-source-const.h>
-#include <babeltrace2/graph/component-filter-const.h>
-#include <babeltrace2/graph/component-sink-const.h>
-#include <babeltrace2/graph/graph-const.h>
+#include <babeltrace2/graph/component.h>
+#include <babeltrace2/graph/graph.h>
#include "common/macros.h"
#include "compat/compiler.h"
#include <babeltrace2/types.h>
}
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);
+ }
}
}