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

Unified Diff: lucictx/lucictx.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 | « luci_config/server/cfgclient/textproto/resolver.go ('k') | milo/build_source/raw_presentation/html.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lucictx/lucictx.go
diff --git a/lucictx/lucictx.go b/lucictx/lucictx.go
index dd9bb7b866dca2699d15724666fb63f4a5ffae16..d42cd9164b5fe0853f7ecfe7e65a9ec02c984d0f 100644
--- a/lucictx/lucictx.go
+++ b/lucictx/lucictx.go
@@ -175,7 +175,7 @@ func Export(ctx context.Context, dir string) (Exported, error) {
// may have secrets.
f, err := ioutil.TempFile(dir, "luci_context.")
if err != nil {
- return nil, errors.Annotate(err).Reason("creating luci_context file").Err()
+ return nil, errors.Annotate(err, "creating luci_context file").Err()
}
l := &liveExport{path: f.Name()}
@@ -184,7 +184,7 @@ func Export(ctx context.Context, dir string) (Exported, error) {
f.Close() // intentionally do this even on error.
if err != nil {
l.Close() // cleans up the tempfile
- return nil, errors.Annotate(err).Reason("writing luci_context").Err()
+ return nil, errors.Annotate(err, "writing luci_context").Err()
}
return l, nil
}
« no previous file with comments | « luci_config/server/cfgclient/textproto/resolver.go ('k') | milo/build_source/raw_presentation/html.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698