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

Better error system #21

Open
petrpan26 opened this issue Oct 17, 2024 · 1 comment
Open

Better error system #21

petrpan26 opened this issue Oct 17, 2024 · 1 comment
Assignees

Comments

@petrpan26
Copy link
Contributor

Right now the codebase are full of unwrap of option and error. This will cause Rust to panic which is an undesirable behaviour. In Rust, panics are generally reserved for unrecoverable error. A suggestion is to have a result framework in place to better catch error.

We can either build a few simple error system then use std::Error or utilizing library such as https://docs.rs/anyhow/latest/anyhow/

@hicder
Copy link
Owner

hicder commented Oct 18, 2024

yeah we definitely don't want those unwrap. let's move them to Result

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