Skip to content

Preverse error when return from failed precheck#24

Merged
ammario merged 1 commit intodevelopfrom
feature/preserve-error
Aug 15, 2018
Merged

Preverse error when return from failed precheck#24
ammario merged 1 commit intodevelopfrom
feature/preserve-error

Conversation

@ammario
Copy link
Member

@ammario ammario commented Aug 13, 2018

Resolves #23

@ammario ammario requested review from nhooyr, rjsabia and scsmithr August 13, 2018 15:36
Copy link

@scsmithr scsmithr left a comment

Choose a reason for hiding this comment

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

I assume the commit msg should be "preserve"?

@ammario ammario force-pushed the feature/preserve-error branch from 89e590d to cb44b8a Compare August 13, 2018 15:57
@ammario
Copy link
Member Author

ammario commented Aug 13, 2018

Waiting on @nhooyr to agree with these changes before merging.

@nhooyr
Copy link
Contributor

nhooyr commented Aug 14, 2018

Commented in #23

@ammario ammario force-pushed the feature/preserve-error branch from cb44b8a to 6262031 Compare August 14, 2018 16:07
@ammario ammario force-pushed the feature/preserve-error branch from 6262031 to d12fd6b Compare August 14, 2018 16:11
@ammario ammario removed the request for review from rjsabia August 14, 2018 16:11
@ammario
Copy link
Member Author

ammario commented Aug 14, 2018

@nhooyr this is ready

Copy link
Contributor

@nhooyr nhooyr left a comment

Choose a reason for hiding this comment

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

lgtm otherwise

return err
e.Reason = r.preCheck()
if e.Reason != nil {
return e.nilIfEmpty()
Copy link
Contributor

Choose a reason for hiding this comment

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

This can never be empty.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it can... At least it was causing a test error because it was.

Copy link
Member Author

Choose a reason for hiding this comment

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

Even if we can prove that is never empty, that function will catch mistakes in-case the behavior changes in the future.

@ammario ammario merged commit d12fd6b into develop Aug 15, 2018
@ammario ammario deleted the feature/preserve-error branch August 15, 2018 01:10
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.

3 participants