Project

General

Profile

Actions

Feature #1336

open

Improve usability of error messages

Added by Matthew Khouzam 12 months ago. Updated 12 months ago.

Status:
New
Priority:
Normal
Category:
Argument parser
Start date:
11/30/2021
Due date:
% Done:

0%

Estimated time:

Description

At the moment babeltrace2's error messages are as follows

$ babeltrace2 trace -o ctf
11-30 09:45:52.878 16686 16686 E CLI/CFG-CLI-ARGS :3971 --output-format=ctf specified without --output (trace output path).
11-30 09:45:52.878 16686 16686 E CLI :2663 Command-line error: retcode=1

ERROR: [ Babeltrace CLI ] ( babeltrace2.c:2663 )
Command-line error: retcode=1
CAUSED BY [ Babeltrace CLI ] ( babeltrace2-cfg-cli-args.c:3971 )
--output-format=ctf specified without --output (trace output path).

where bold is bold and italics are colored.

The part the user needs to see in order to solve their issue is the last line and is one of the few items not highlighted:

--output-format=ctf specified without --output (trace output path).

This line is difficult to find in the wall of text if you don't know what you are looking for.

I would recommend

$ babeltrace2 trace -o ctf
babeltrace2: --output-format=ctf specified without --output (trace output path).

and

$babeltrace2 trace -o ctf -v
11-30 09:45:52.878 16686 16686 E CLI/CFG-CLI-ARGS :3971 --output-format=ctf specified without --output (trace output path).
11-30 09:45:52.878 16686 16686 E CLI :2663 Command-line error: retcode=1

ERROR: [ Babeltrace CLI ] ( babeltrace2.c:2663 )
Command-line error: retcode=1
CAUSED BY [ Babeltrace CLI ] ( babeltrace2-cfg-cli-args.c:3971 )
--output-format=ctf specified without --output (trace output path).

Actions #1

Updated by Mathieu Desnoyers 12 months ago

  • Tracker changed from Bug to Feature
Actions

Also available in: Atom PDF