-
Notifications
You must be signed in to change notification settings - Fork 8
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
[Proposal] Wrap errors with no kind #13
Comments
erizocosmico
changed the title
Wrap errors with no kind
[Proposal] Wrap errors with no kind
Aug 2, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sometimes as we pass the error down the line we might want to annotate the error with more information and we don't want to check its type later. For these cases,
Kind
is an overkill, because you need to declare a kind and then useWrap
.A
Wrap
top-level function could be nice for this use-case.Instead of:
It enables having ad-hoc error messages just for adding info and reduces the amount of kinds that need to be declared.
Reference:
The text was updated successfully, but these errors were encountered: