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

Unified Diff: milo/build_source/swarming/build.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 | « milo/build_source/raw_presentation/html.go ('k') | milo/build_source/swarming/buildinfo.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: milo/build_source/swarming/build.go
diff --git a/milo/build_source/swarming/build.go b/milo/build_source/swarming/build.go
index c4a7c9dbfc0cee041f498e764ef966e8a351e305..bb893305ad1c67baeaa7aa576cd335515cdf7c86 100644
--- a/milo/build_source/swarming/build.go
+++ b/milo/build_source/swarming/build.go
@@ -506,7 +506,7 @@ func (bl *buildLoader) newEmptyAnnotationStream(c context.Context, addr *types.S
}
client, err := fn(c, addr.Host)
if err != nil {
- return nil, errors.Annotate(err).Reason("failed to create LogDog client").Err()
+ return nil, errors.Annotate(err, "failed to create LogDog client").Err()
}
as := raw_presentation.AnnotationStream{
@@ -515,7 +515,7 @@ func (bl *buildLoader) newEmptyAnnotationStream(c context.Context, addr *types.S
Path: addr.Path,
}
if err := as.Normalize(); err != nil {
- return nil, errors.Annotate(err).Reason("failed to normalize annotation stream parameters").Err()
+ return nil, errors.Annotate(err, "failed to normalize annotation stream parameters").Err()
}
return &as, nil
@@ -602,7 +602,7 @@ func (bl *buildLoader) swarmingBuildImpl(c context.Context, svc swarmingService,
// If the LogDog stream is available, load the step from that.
as, err := bl.newEmptyAnnotationStream(c, logDogStreamAddr)
if err != nil {
- return nil, errors.Annotate(err).Reason("failed to create LogDog annotation stream").Err()
+ return nil, errors.Annotate(err, "failed to create LogDog annotation stream").Err()
}
prefix, _ := logDogStreamAddr.Path.Split()
« no previous file with comments | « milo/build_source/raw_presentation/html.go ('k') | milo/build_source/swarming/buildinfo.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698