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

Wrap assumption violations in ErrorCollector #1395

Closed

Conversation

kcooney
Copy link
Member

@kcooney kcooney commented Nov 30, 2016

addError() and checkSucceeds() now wrap assumption violations.

if (error instanceof AssumptionViolatedException) {
AssertionError e = new AssertionError(error.getMessage());
e.initCause(error);
error = e;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor thing: I'm generally not happy with reassigning method parameters.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed (though for a method this small, I find the previous version readable and slightly better than the duplication in the updated code)

@kcooney kcooney force-pushed the ErrorCollectorWrapAssumptionFailure branch from d5e7b04 to 867f186 Compare November 30, 2016 17:02
@kcooney
Copy link
Member Author

kcooney commented Nov 30, 2016

Note there are two commits, and I want to keep them separate. I will be happy to do the merge.

If this is approved I'll also merge #1371

@kcooney
Copy link
Member Author

kcooney commented Dec 5, 2016

Merged.

@kcooney kcooney closed this Dec 5, 2016
@kcooney kcooney deleted the ErrorCollectorWrapAssumptionFailure branch December 5, 2016 07:14
@kcooney
Copy link
Member Author

kcooney commented Dec 5, 2016

added to the release notes

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