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

Use *thiserror* for error handling #21

Closed
TianyiShi2001 opened this issue Jan 3, 2021 · 2 comments
Closed

Use *thiserror* for error handling #21

TianyiShi2001 opened this issue Jan 3, 2021 · 2 comments

Comments

@TianyiShi2001
Copy link
Contributor

I suggest using thiserror for error handling. There's a great article explaining why it's more ergonomic and efficient than manual implementation (which convinced me to use thiserror in my crates): https://nick.groenen.me/posts/rust-error-handling/

rust-bio have also adopted thiserror recently.

@douweschulte
Copy link
Owner

Cool I will look into it as well then.

@douweschulte
Copy link
Owner

I looked at it and did not really see obvious improvements over doing it manually, especially because I had a somewhat weird idea in my head of having an Error type which both can be used as a library return error (so easy for other programmers) as for display to end users.

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