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

Improve error handling ergonomics for call #39

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ademan
Copy link

@Ademan Ademan commented Nov 16, 2024

This change I think it improves the ergonomics of handling custom errors significantly.

From the tests you can see that it's fairly unintrusive overall, it eliminates the need for lots of .map_err(|e| e.into())s and eliminates the need for downcasting the Error::Other variant, as well as consolidating Error::Rusqlite and Error::Other into Error::Error which is generic.

In particular look at test_ergonomic_errors to see how it improves error ergonomics.

I understand if it's too big of a change though.

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

Successfully merging this pull request may close these issues.

1 participant