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

Improved error handling #27

Open
ealmloff opened this issue Apr 23, 2024 · 0 comments
Open

Improved error handling #27

ealmloff opened this issue Apr 23, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@ealmloff
Copy link
Member

Specific Demand

  • Reducing the number of unwraps

When optimizing assets, manganis currently unwraps in a few places that may fail (eg. opening a file here). We should return an error instead

  • Moving away from anyhow

Anyhow is great for binaries and prototyping libraries, but it makes it difficult to handle different errors in CLIs using manganis. We should switch to an enum with explicit error types using thiserror

Implement Suggestion

  • Bubble up more errors with ?
  • Switch to an error enum with error derived using thiserror
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant