From: Simon Marchi Date: Wed, 2 Oct 2019 15:33:03 +0000 (-0400) Subject: cli: update error message in set_stream_intersections X-Git-Tag: v2.0.0-rc1~61 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=0457a1ae55cd92797015660202c182be7fe1f897 cli: update error message in set_stream_intersections The error message printed when the `babeltrace.trace-infos` query fails, regardless of the reason, is "Component class does not support the `babeltrace.trace-infos` query". I think it's misleading, because this is just one particular error case. It could be that the component class supports the query, but failed because it didn't like the parameters we passed. Update the message to be a bit more generic. The fail_reason printed just after gives a bit more precision about the error. Change-Id: If556129b612cb6aa9c480b3f863368e48e8a6d4a Signed-off-by: Simon Marchi Reviewed-on: https://review.lttng.org/c/babeltrace/+/2115 Reviewed-by: Philippe Proulx --- diff --git a/src/cli/babeltrace2.c b/src/cli/babeltrace2.c index 4cc4234e..ececd63a 100644 --- a/src/cli/babeltrace2.c +++ b/src/cli/babeltrace2.c @@ -2099,7 +2099,7 @@ int set_stream_intersections(struct cmd_run_ctx *ctx, cfg_comp->params, &query_result, &fail_reason); if (ret) { - BT_CLI_LOGE_APPEND_CAUSE("Component class does not support the `babeltrace.trace-infos` query: %s: " + BT_CLI_LOGE_APPEND_CAUSE("Failed to execute `babeltrace.trace-infos` query: %s: " "comp-class-name=\"%s\"", fail_reason, bt_component_class_get_name(comp_cls)); ret = -1;