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. #8

Closed
onelson opened this issue Jun 23, 2019 · 0 comments · Fixed by #17
Closed

Improve error handling. #8

onelson opened this issue Jun 23, 2019 · 0 comments · Fixed by #17
Assignees
Milestone

Comments

@onelson
Copy link
Owner

onelson commented Jun 23, 2019

A common pattern in rust libraries is to have a single enum with variants to model the different failure modes. In the initial implementation, the failure modes were handled as "pass-through" from the C library as String.

Once the work for #7 has been completed, we should be able to more comprehensively model these different failure modes as variants. This will result in a breaking API change and so this will be deferred until a later release.

@onelson onelson self-assigned this Jun 23, 2019
@onelson onelson added this to the v0.4.0 milestone Jun 23, 2019
@onelson onelson changed the title Use enum for errors Improve error handling. Jul 5, 2019
onelson added a commit that referenced this issue Jul 6, 2019
onelson added a commit that referenced this issue Jul 6, 2019
Implements std::error::Error for jq_rs::errors::Error. Fixes #8.
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 a pull request may close this issue.

1 participant