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

Replace anyhow #26

Closed
Furisto opened this issue Aug 19, 2021 · 3 comments
Closed

Replace anyhow #26

Furisto opened this issue Aug 19, 2021 · 3 comments

Comments

@Furisto
Copy link
Member

Furisto commented Aug 19, 2021

The anyhow result type appears in our public api, which is not ideal. Should we switch to thiserror or write our own error types? What do you think?

@humancalico
Copy link

The anyhow README mentions

Use Anyhow if you don't care what error type your functions return, you just want it to be easy. This is common in application code. Use thiserror if you are a library that wants to design your own dedicated error type(s) so that on failures the caller gets exactly the information that you choose.

So it makes sense to use thiserror for our use-case.

@saschagrunert
Copy link
Member

Yeah I agree, having own error types seems reasonable. 👍

@Furisto
Copy link
Member Author

Furisto commented Aug 20, 2021

I will take care of it.

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

3 participants