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

Limit use of anyhow #57

Open
Gnurou opened this issue Nov 26, 2023 · 2 comments
Open

Limit use of anyhow #57

Gnurou opened this issue Nov 26, 2023 · 2 comments

Comments

@Gnurou
Copy link
Collaborator

Gnurou commented Nov 26, 2023

Anyhow should only be used when the returned errors are not well defined. For most cases, thiserror is a better and lighter fit. This issue is to track the removal of anyhow from the codec and decoder code.

@dwlsalmeida
Copy link
Collaborator

@Gnurou IIRC there was the push at the beginning to do the exact opposite, i.e.: to go from custom error types to anyhow?

@Gnurou
Copy link
Collaborator Author

Gnurou commented Nov 27, 2023

Was there? I don't know what the rationale was, but in my experience thiserror forces a stronger discipline wrt. how we handle errors (and may end up being more lightweight), so I'd like to consider using it for at least the lowest layers. I'm happy to consider counter-arguments though.

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

2 participants