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 #9

Open
ethanndickson opened this issue Nov 21, 2023 · 0 comments
Open

Improve Error Handling #9

ethanndickson opened this issue Nov 21, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@ethanndickson
Copy link
Owner

Currently, library interfaces expose the anyhow Error type, a universal, opaque error type that includes error context as a string.

Since we are unable to envisage exactly how users of the library might want to handle errors, it would be more appropriate to build transparent error types that provide more insight into why operations failed, and expose those instead.

With this implemented it may then be sensible to have user defined callbacks accept a Result<T> instead of a T as their argument, to allow users to specify their own error handling behaviour - though this would be a breaking API change.

@ethanndickson ethanndickson added the enhancement New feature or request label Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant