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

common/hexutil: wrap errors in json.UnmarshalTypeError #14686

Merged
merged 1 commit into from
Jun 27, 2017

Conversation

fjl
Copy link
Contributor

@fjl fjl commented Jun 23, 2017

This adds type and struct field context to error messages.
Instead of "hex string of odd length" users will now see "json: cannot
unmarshal hex string of odd length into Go struct field SendTxArgs.from
of type common.Address".

@fjl fjl force-pushed the hexutil-json-type-error branch from 55fed0b to 3437454 Compare June 23, 2017 09:00
@fjl
Copy link
Contributor Author

fjl commented Jun 23, 2017

Related: #14682

@fjl fjl force-pushed the hexutil-json-type-error branch from 3437454 to 0eecc8e Compare June 23, 2017 09:05
@fjl fjl added this to the 1.6.7 milestone Jun 23, 2017
@karalabe
Copy link
Member

@fjl Tests fail, PTAL

@fjl fjl force-pushed the hexutil-json-type-error branch from 0eecc8e to 2a1a769 Compare June 27, 2017 10:42
@fjl
Copy link
Contributor Author

fjl commented Jun 27, 2017

@karalabe PTAL

This adds type and struct field context to error messages.
Instead of "hex string of odd length" users will now see "json: cannot
unmarshal hex string of odd length into Go struct field SendTxArgs.from
of type common.Address".
@fjl fjl force-pushed the hexutil-json-type-error branch from 2a1a769 to 4a741df Compare June 27, 2017 11:15
Copy link
Member

@karalabe karalabe left a comment

Choose a reason for hiding this comment

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

LGTM

@karalabe karalabe merged commit bb36627 into ethereum:master Jun 27, 2017
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.

None yet

2 participants