src.ctf.fs: append error cause when no traces are found in directory
[babeltrace.git] / src / plugins / ctf / fs-src / fs.c
index da5a1eb6d9bdd1e54895ab6fbc734a7e48fa03f2..84dae6a1b107b88582af9ddbe2a4af0126f2c8d4 100644 (file)
@@ -260,7 +260,7 @@ bt_component_class_message_iterator_init_method_status ctf_fs_iterator_init(
        self_comp = port_data->ctf_fs->self_comp;
        msg_iter_data = g_new0(struct ctf_fs_msg_iter_data, 1);
        if (!msg_iter_data) {
-               ret = BT_COMPONENT_CLASS_MESSAGE_ITERATOR_NEXT_METHOD_STATUS_MEMORY_ERROR;
+               ret = BT_COMPONENT_CLASS_MESSAGE_ITERATOR_INIT_METHOD_STATUS_MEMORY_ERROR;
                goto error;
        }
 
@@ -1315,6 +1315,9 @@ int ctf_fs_component_create_ctf_fs_traces_one_root(
        if (!trace_paths) {
                BT_COMP_LOGE("No CTF traces recursively found in `%s`.",
                        path_param);
+               (void) BT_CURRENT_THREAD_ERROR_APPEND_CAUSE_FROM_COMPONENT(
+                       ctf_fs->self_comp,
+                       "No CTF traces recursively found in `%s`.", path_param);
                goto error;
        }
 
This page took 0.024676 seconds and 4 git commands to generate.