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

Error reporting #5

Open
9ary opened this issue Apr 18, 2024 · 0 comments
Open

Error reporting #5

9ary opened this issue Apr 18, 2024 · 0 comments

Comments

@9ary
Copy link
Member

9ary commented Apr 18, 2024

Currently, main returns a Result<(), Box<dyn Error>>, which means

  • The exit code is always 0 or 1
  • The error message is a debug print of the Error

Context is also not provided for errors. Use https://docs.rs/anyhow/latest/anyhow/.

Clap also calls exit(2) directly. try_parse should be used instead.

Using https://crates.io/crates/exitcode would be a good idea for informative exit codes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant