Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Avoid trampling on existing errors in defer funcs #27

Merged
merged 2 commits into from
Jan 25, 2019
Merged

Conversation

dmjones
Copy link
Contributor

@dmjones dmjones commented Jan 25, 2019

My fix for #24 introduced a bug, which this commit resolves. The problem was overwriting error information with the results from deferred functions, without first checking if an error had already been reported.

This could have the consequence of hiding errors entirely. Or, at least, replacing useful errors with less useful ones.

Thanks to @optnfast for spotting.

@optnfast
Copy link
Contributor

That looks better. I don't see any other bad defers.

@dmjones dmjones requested a review from sburton84 January 25, 2019 11:19
@dmjones dmjones merged commit 529d2c9 into master Jan 25, 2019
@dmjones dmjones deleted the fix-error-hiding branch January 25, 2019 12:14
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants