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

Error wrapping #183

Merged
merged 21 commits into from
Nov 9, 2024
Merged

Error wrapping #183

merged 21 commits into from
Nov 9, 2024

Conversation

sftse
Copy link
Contributor

@sftse sftse commented Oct 22, 2024

I was taking a closer look at error handling, I noticed that some small changes can make it simpler to understand where errors are coming from.

The two most significant changes are to introduce a specific rendering error type that is only converted to the library-wide Error as late as possible and to move Ok-wrapping of closure return types as close to the cons identifier as possible. This last change permits grepping for the cons identifier and one can see at a glance whether the closure can error or not.

@sftse
Copy link
Contributor Author

sftse commented Oct 22, 2024

Good catch by CI, didn't mean to break semver.

@jugglerchris
Copy link
Owner

Thanks! Looks good to me.

@jugglerchris jugglerchris merged commit f7a7604 into jugglerchris:main Nov 9, 2024
5 checks passed
@sftse sftse deleted the error-wrapping branch November 11, 2024 11:39
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.

2 participants