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

Convert anyhow::Results in parsing functions to custom error type. #32

Open
cogsandsquigs opened this issue Mar 10, 2023 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@cogsandsquigs
Copy link

I like this library, but one downside is that it returns an anyhow::Result instead of a custom error type. Generally, it's better for libraries to implement these custom error types as it gives more information to the user about what went wrong, as anyhow::Result can be very vague at times. Consider possibly using thiserror or snafu? That way I can actually see (and report!) what went wrong instead of dealing with an opaque type returned by anyhow.

@cogsandsquigs cogsandsquigs changed the title Convert Results for parsing functions from anyhow::Result to custom error type. Convert anyhow::Results in parsing functions to custom error type. Mar 10, 2023
@waltzofpearls
Copy link
Owner

Hey @cogsandsquigs, thanks for the suggestion. That's a great idea. I will take a look at thiserror and snafu, and make improvements on error handling.

@waltzofpearls waltzofpearls added the enhancement New feature or request label Mar 25, 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

2 participants