Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(900)

Unified Diff: logdog/client/butler/output/logdog/output.go

Issue 2963503003: [errors] Greatly simplify common/errors package. (Closed)
Patch Set: fix nits Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « logdog/appengine/coordinator/service.go ('k') | logdog/client/butler/streamserver/namedPipe_posix.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: logdog/client/butler/output/logdog/output.go
diff --git a/logdog/client/butler/output/logdog/output.go b/logdog/client/butler/output/logdog/output.go
index afc9efd125782745471d155249402a968e142d6b..6feee224cafdc35694fa96889891266296a99cb9 100644
--- a/logdog/client/butler/output/logdog/output.go
+++ b/logdog/client/butler/output/logdog/output.go
@@ -88,12 +88,12 @@ func (cfg *Config) Register(c context.Context) (output.Output, error) {
return nil, errors.New("no host supplied")
}
if err := cfg.Project.Validate(); err != nil {
- return nil, errors.Annotate(err).Reason("failed to validate project").
- D("project", cfg.Project).Err()
+ return nil, errors.Annotate(err, "failed to validate project").
+ InternalReason("project(%v)", cfg.Project).Err()
}
if err := cfg.Prefix.Validate(); err != nil {
- return nil, errors.Annotate(err).Reason("failed to validate prefix").
- D("prefix", cfg.Prefix).Err()
+ return nil, errors.Annotate(err, "failed to validate prefix").
+ InternalReason("prefix(%v)", cfg.Prefix).Err()
}
// Open a pRPC client to our Coordinator instance.
« no previous file with comments | « logdog/appengine/coordinator/service.go ('k') | logdog/client/butler/streamserver/namedPipe_posix.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698