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

migrate error handling to anyhow #26

Merged
merged 2 commits into from
Nov 16, 2023
Merged

migrate error handling to anyhow #26

merged 2 commits into from
Nov 16, 2023

Commits on Nov 16, 2023

  1. Cargo: add anyhow as dependency

    Add a new dependency of `anyhow` crate, to use flexible concrete
    error handling mechanism, instead of the native error types.
    dongsupark committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    337c2df View commit details
    Browse the repository at this point in the history
  2. *: migrate error handling to anyhow

    To follow error handling convention of anyhow, insert `.context` to add
    detailed message of error context when returning from functions.
    
    In case of an immediate error exit, use a `bail!` macro.
    
    Note, main functions and unit tests stay untouched if possible.
    dongsupark committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    44d7530 View commit details
    Browse the repository at this point in the history