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

Use serrors.New instead of common.NewBasicError #3175

Merged

Conversation

lukedirtwalker
Copy link
Collaborator

@lukedirtwalker lukedirtwalker commented Sep 20, 2019

for simple errors without additional wrapping/context.

This PR was generated by replacing common.NewBasicError\(("[^"]+"), nil\)
with serrors.New($1) and running goimports afterwards.


This change is Reviewable

Copy link
Contributor

@oncilla oncilla left a comment

Choose a reason for hiding this comment

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

Reviewed 165 of 165 files at r1.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @lukedirtwalker)


go/lib/infra/modules/itopo/itopo.go.orig, line 1 at r1 (raw file):

// Copyright 2018 ETH Zurich

remove


go/proto/cert_mgmt.capnp.go, line 7 at r1 (raw file):

import (
	strconv "strconv"

ha, why does this differ?

Copy link
Collaborator Author

@lukedirtwalker lukedirtwalker left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @oncilla)


go/lib/infra/modules/itopo/itopo.go.orig, line 1 at r1 (raw file):

Previously, Oncilla wrote…

remove

Done.


go/proto/cert_mgmt.capnp.go, line 7 at r1 (raw file):

Previously, Oncilla wrote…

ha, why does this differ?

I don't know, but it seems to be needed. otherwise the build fails :man-shrugging: ?

Copy link
Contributor

@oncilla oncilla left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 9 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved


go/proto/cert_mgmt.capnp.go, line 7 at r1 (raw file):

Previously, lukedirtwalker (Lukas Vogel) wrote…

I don't know, but it seems to be needed. otherwise the build fails :man-shrugging: ?

what build fails?

Copy link
Contributor

@oncilla oncilla left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 9 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved


go/proto/cert_mgmt.capnp.go, line 7 at r1 (raw file):

Previously, Oncilla wrote…

what build fails?

Ah, we check that stuff is consistent in CI.

My question was rather, why did it change in your version. Maybe you use a different version of capnp genrerator?

Copy link
Contributor

@oncilla oncilla left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

for simple errors without additional wrapping/context.

This PR was generated by replacing `common.NewBasicError\(("[^"]+"), nil\)`
with `serrors.New($1)` and running goimports afterwards.
Copy link
Contributor

@oncilla oncilla left a comment

Choose a reason for hiding this comment

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

Reviewed 4 of 4 files at r3.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@lukedirtwalker lukedirtwalker merged commit 2eab837 into scionproto:master Oct 7, 2019
@lukedirtwalker lukedirtwalker deleted the pubNewErrorApproach3 branch October 7, 2019 11:49
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