-
Notifications
You must be signed in to change notification settings - Fork 30
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
Error handling in this rust version #3
Comments
Thanks for the feedback! I can definitely do that. Do you have specific places where you think error handling is important in particular ? |
The |
That's a good point. Lets me see how I can fix that |
I added proper error handling. I'll keep this issue open until I release a new version |
Fixed in version 0.3.0 |
There is almost no error/exception-handling code in Python version's Pickledb.It works because Python use try/except and exception to deal with errors and failures.You can always put a try/except block in your code that calling the Pickledb's API.Which will handle the exceptions raised from the internal of the Pickledb.In Rust's version,there is the same situation.But Rust don't use exception,is it a good choice to just panic the thread if something went wrong in internal code.
This question is raised because I saw so many
unwrap
andexpect
in Pickledb-rs's code.Would it not be more robust if use error and option?Any plan for this?The text was updated successfully, but these errors were encountered: