Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
apiserver/common: standardise on juju/errors #4591
Conversation
|
$$JFDI$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
added a commit
that referenced
this pull request
Mar 2, 2016
jujubot
merged commit 92376a1
into
juju:master
Mar 2, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
davecheney commentedMar 2, 2016
common/errors.go imported both the go errors package, and our
juju/errors superset. This was so sentinel errors were created without
the usual juju/errors file/line tracking.
This is unncessary, juju/errors.New is fully compatible with errors.New;
its sentinel values can still be compared by value.
The only visible change is the error trace, rather that listing no
file/ilne for the final error value, it will list the file/line that the
value was declared at the package level. This distinction is not
important, because what we look for in the error trace is not where the
error was created, but who was the caller -- if we wanted the former,
sentinal errors are not the right tool.
(Review request: http://reviews.vapour.ws/r/4031/)