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

More precise handling of the XStream errors #658

Merged
merged 3 commits into from
Jan 24, 2014

Conversation

mgurov
Copy link
Contributor

@mgurov mgurov commented Jan 11, 2014

fixes #657 and rethrows other unrecognized XStream errors instead of claiming them to be "null to primitive assignment" error.

@aslakhellesoy
Copy link
Contributor

LGTM - thanks!

if (e.getCause() instanceof NullPointerException) {
throw new CucumberException(String.format("Can't assign null value to one of the primitive fields in %s. Please use boxed types.", e.get("class")));
} else {
throw e;
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't e be wrapped in a CucumberException also in this case. The construct throw new CucumberException(e); seems to be pretty common in the code base.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

right, we probably don't want abstraction leak by downstream code getting XStream exceptions.

@brasmusson
Copy link
Contributor

@aslakhellesoy And with "LGTM", you mean ok to merge? (Including the wrapping of the final unwapped ConversionException which was added after your comment)

@aslakhellesoy
Copy link
Contributor

Yes, when I LGTM something it's ok for anyone on the team to merge. Thanks Björn

On Thursday, 23 January 2014 at 14:13, Björn Rasmusson wrote:

@aslakhellesoy (https://github.com/aslakhellesoy) And with "LGTM", you mean ok to merge? (Including the wrapping of the final unwapped ConversionException which was added after your comment)


Reply to this email directly or view it on GitHub (#658 (comment)).

brasmusson added a commit that referenced this pull request Jan 24, 2014
@brasmusson brasmusson merged commit 6fe3fb5 into cucumber:master Jan 24, 2014
@brasmusson
Copy link
Contributor

Merged. Thanks for your contribution @mgurov.

@mgurov
Copy link
Contributor Author

mgurov commented Jan 24, 2014

my pleasure to contribute to so much useful project.

@mgurov mgurov deleted the xstreamErrorWrapping branch January 24, 2014 08:53
@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Double entry same table field causes exception with misleading message
3 participants