Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

gps: fix unwrapVcsErr to handle nil causes #1142

Merged
merged 2 commits into from
Sep 9, 2017
Merged

gps: fix unwrapVcsErr to handle nil causes #1142

merged 2 commits into from
Sep 9, 2017

Conversation

jmank88
Copy link
Collaborator

@jmank88 jmank88 commented Sep 9, 2017

What does this do / why do we need it?

In #1121 I didn't anticipate that incoming vcs errors could have nil original errors, and the result is a nil return value: #1128 (comment)
This PR adjusts unwrapVcsErr to recognize nil original errors, and wrap them differently.

Which issue(s) does this PR fix?

Should fix -> #1128, but let's not close until confirmed.

@jmank88 jmank88 requested a review from sdboyer as a code owner September 9, 2017 12:08
@jmank88 jmank88 requested review from ibrasho and sdboyer and removed request for sdboyer September 9, 2017 12:08
Copy link
Collaborator

@ibrasho ibrasho left a comment

Choose a reason for hiding this comment

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

LGTM.

@ibrasho
Copy link
Collaborator

ibrasho commented Sep 9, 2017

Maybe add a test? I'm not sure how useful that would be tbh.

@jmank88
Copy link
Collaborator Author

jmank88 commented Sep 9, 2017

Maybe add a test? I'm not sure how useful that would be tbh.

On second thought, I think that a test for just the nil case is worthwhile.

@sdboyer sdboyer merged commit 6890c50 into golang:master Sep 9, 2017
@jmank88 jmank88 deleted the vcs_err_fix branch September 11, 2017 13:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants