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

Unified Diff: deploytool/cmd/luci_deploy/tools.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 | « deploytool/cmd/luci_deploy/title.go ('k') | deploytool/cmd/luci_deploy/util.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: deploytool/cmd/luci_deploy/tools.go
diff --git a/deploytool/cmd/luci_deploy/tools.go b/deploytool/cmd/luci_deploy/tools.go
index 34cb3dc3b0b3b865250e6a622c72def8bf86c2f1..29fdbfd831c8953d317a9db28ec36c53d06df0c0 100644
--- a/deploytool/cmd/luci_deploy/tools.go
+++ b/deploytool/cmd/luci_deploy/tools.go
@@ -48,7 +48,7 @@ func (t *tools) getLookup(command string) (string, error) {
if path == "" {
// Lookup was attempted, but tool could not be found.
- return "", errors.Reason("tool %(toolName)q is not available").D("toolName", command).Err()
+ return "", errors.Reason("tool %q is not available", command).Err()
}
return path, nil
}
@@ -173,7 +173,8 @@ func (t *gitTool) getRevListCount(c context.Context, gitDir string) (int, error)
output := strings.TrimSpace(x.stdout.String())
v, err := strconv.Atoi(output)
if err != nil {
- return 0, errors.Annotate(err).Reason("failed to parse rev-list count").D("output", output).Err()
+ return 0, errors.Annotate(err, "failed to parse rev-list count").
+ InternalReason("output(%s)", output).Err()
}
return v, nil
}
« no previous file with comments | « deploytool/cmd/luci_deploy/title.go ('k') | deploytool/cmd/luci_deploy/util.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698