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

Handle string errors in Decode() #60

Merged
merged 1 commit into from
Mar 23, 2017
Merged

Handle string errors in Decode() #60

merged 1 commit into from
Mar 23, 2017

Conversation

sebnow
Copy link
Contributor

@sebnow sebnow commented Mar 21, 2017

It's possible that Decode() panics with a plain string. The string is
type asserted to error which fails due to string not implementing
the error interface.

Example panic with string:

reflect: reflect.Value.Set using value obtained using unexported field

It's possible that Decode() panics with a plain `string`. The `string` is
type asserted to `error` which fails due to `string` not implementing
the `error` interface.

Example panic with string:

    reflect: reflect.Value.Set using value obtained using unexported field
@huandu huandu merged commit 7e00ad0 into huandu:master Mar 23, 2017
@huandu
Copy link
Owner

huandu commented Mar 23, 2017

Thanks for your contribution!

@sebnow sebnow deleted the string-error branch March 23, 2017 10:22
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.

2 participants