Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design consistent user friendly error output #1

Closed
danielpclark opened this issue Oct 7, 2017 · 1 comment
Closed

Design consistent user friendly error output #1

danielpclark opened this issue Oct 7, 2017 · 1 comment

Comments

@danielpclark
Copy link
Owner

danielpclark commented Oct 7, 2017

Errors have inconsistent behavior. Create a nice experience.

Structure the main application so all errors will produce a relevant error description to an end user. No errors are to be displayed relating to code in a released binary. Errors should be pleasant to read… as in easy on the eyes and easy to understand.

@danielpclark danielpclark changed the title Design consistent error output Design consistent user friendly error output Oct 10, 2017
@danielpclark
Copy link
Owner Author

danielpclark commented Oct 10, 2017

Current Errors

1) Invalid Range

Input:

abrute asdf asdf -- asdf

Output:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseIntError { kind: InvalidDigit }', /checkout/src/libcore/result.rs:906:4

2) File Missing

Input:

abrute 4 asdf -- asdf

Output:

Error: File "asdf" does not exist.
error: "Please verify last argument is the proper filename."

3) Missing Double Dash

Input:

abrute 4 asdf asdf

Output:

error: Found argument 'asdf' which wasn't expected, or isn't valid in this context

USAGE:
    abrute [OPTIONS] <RANGE> <CHARACTERS> [--] <TARGET>

For more information try --help

Note the options are in the wrong location and the dash dash should not be boxed in this message.

4) Invalid Adjacent Number

Input:

abrute 4 asdf -a g -- asdf

Output:

error: Invalid value for '--adjacent <adjacent>': The value did not contain valid digit from 0 to 255

5) Invalid Character Start Sequence

Using characters that don't exist in the sequence for the start.

Input:

abrute 4 asdf -s 1234 -- asdf

Output:

thread 'main' panicked at 'no entry found for key', /checkout/src/libcore/option.rs:839:4

danielpclark added a commit that referenced this issue Oct 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant