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

Unified Diff: vpython/application/probe.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 | « vpython/application/application.go ('k') | vpython/application/subcommand_delete.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vpython/application/probe.go
diff --git a/vpython/application/probe.go b/vpython/application/probe.go
index a12713e5bc986c3c3a4e95fbcf29219fd6dfe1b0..2f0bdb2ee04bfc80571c50db1555feafc9e3d709 100644
--- a/vpython/application/probe.go
+++ b/vpython/application/probe.go
@@ -104,9 +104,7 @@ func (lp *lookPath) checkWrapper(c context.Context, path string, env environ.Env
output, err := cmd.CombinedOutput()
rc, ok := exitcode.Get(err)
if !ok {
- err = errors.Annotate(err).Reason("failed to check if %(path)q is a wrapper").
- D("path", path).
- Err()
+ err = errors.Annotate(err, "failed to check if %q is a wrapper", path).Err()
return
}
@@ -130,7 +128,7 @@ func (lp *lookPath) checkWrapper(c context.Context, path string, env environ.Env
// The target returned non-zero, but didn't identify as a wrapper. It is
// likely something that happens to be named the same thing as the target,
// which is an error.
- err = errors.Annotate(err).Reason("wrapper check returned non-zero").Err()
+ err = errors.Annotate(err, "wrapper check returned non-zero").Err()
}
return
« no previous file with comments | « vpython/application/application.go ('k') | vpython/application/subcommand_delete.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698