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

Better support for errors.Is and errors.As #94

Merged
merged 3 commits into from
Jan 8, 2021
Merged

Better support for errors.Is and errors.As #94

merged 3 commits into from
Jan 8, 2021

Conversation

paultyng
Copy link
Contributor

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.

Copy link
Member

@radeksimko radeksimko left a 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.

@paultyng
Copy link
Contributor Author

The test failure here is that interruption of time_sleep doesn't seem to work in 0.11, so I've just skipped < 0.12 for the timeout test.

@paultyng
Copy link
Contributor Author

paultyng commented Oct 5, 2020

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.

@paultyng paultyng force-pushed the unwrap branch 3 times, most recently from aa8df1d to 06a9b9b Compare October 5, 2020 17:19
tfexec/cmd_default.go Outdated Show resolved Hide resolved
@paultyng
Copy link
Contributor Author

paultyng commented Dec 7, 2020

@kmoe this is cleaned up now and passes with your plan file test fixes.

@paultyng paultyng force-pushed the unwrap branch 5 times, most recently from 07d6f35 to e2d9efc Compare January 5, 2021 17:01
@paultyng paultyng merged commit 592bcd1 into master Jan 8, 2021
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.

3 participants