-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Conversation
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; |
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.
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.
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.
right, we probably don't want abstraction leak by downstream code getting XStream exceptions.
@aslakhellesoy And with "LGTM", you mean ok to merge? (Including the wrapping of the final unwapped |
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:
|
Merged. Thanks for your contribution @mgurov. |
my pleasure to contribute to so much useful project. |
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. |
fixes #657 and rethrows other unrecognized XStream errors instead of claiming them to be "null to primitive assignment" error.