-
Notifications
You must be signed in to change notification settings - Fork 4
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
Improve error handling #28
Comments
Maybe we should switch to https://docs.rs/error-chain/0.10.0/error_chain/ |
@g5pw great, I assigned you! I'm a bit unsure about failure. It has a few advantages, but also a few disadvantages. But those mostly affect libraries. Since spaceapi-server-rs is mostly used directly by the end user, I think it would be fine though. @g5pw if you want you can take a closer look at what failure offers and what advantages and disadvantages are. Maybe error-chain would also still be a good option, it would allow us to chain errors from the spaceapi-rs and spaceapi-server-rs crates. Another option would be to just keep using quick-error, but to create a custom error enum for all types of errors that can happen in this crate. |
Hm, from a quick look it looked like failure crate would be the successor of error-chain, but apparently that's not the case. I'll try to look more into it in these days :) |
I though about this for a while and read both intros, it looks like |
Looking at it now I'd prefer to use https://crates.io/crates/thiserror since we already use it in https://github.com/spaceapi-community/spaceapi-rs |
Both |
Go over errors, handle them consistently, don't use unwrap.
Regarding the error macro, we should probably switch to https://github.com/tailhook/quick-error.
The text was updated successfully, but these errors were encountered: