Skip to content

Error reporting #5

@9ary

Description

@9ary

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions