-
Notifications
You must be signed in to change notification settings - Fork 120
Better support for errors.Is and errors.As #94
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok with merging this (once test failures are addressed) - I suppose it's useful to have a single errors.Is
/errors.As
on the consumer side as opposed to two, but my main concern was lack of context in error messaging resulting from the default errors from stdlib.
I will address that differently in a different PR.
The test failure here is that interruption of |
Of course this succeeds in Windows which is where I wrote it 😭 I'll have to switch over to WSL and see whats up on linux. |
aa8df1d
to
06a9b9b
Compare
da9aaae
to
a413f00
Compare
@kmoe this is cleaned up now and passes with your plan file test fixes. |
07d6f35
to
e2d9efc
Compare
And respond to errors.Is for Context errors
This potentially supersedes #91
Probably best to review individual commits, the first commit splits exported errors to two files, one for exit error wrappers and one for the rest. No other changes beyond comments. The second commit adds the support for unwrapping and
errors.Is
comparisons.