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

Unified Diff: common/errors/errors.go

Issue 1249933002: Move multierror logic into luci-go. (Closed) Base URL: https://github.com/luci/luci-go@add_mathrand
Patch Set: Add New method to make importing common/errors a drop-in for the stdlib errors Created 5 years, 5 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 | « no previous file | common/errors/errors_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/errors/errors.go
diff --git a/common/errors/errors.go b/common/errors/errors.go
index 3deb920326171543e6b5bda57141516d01e60c5b..ae4e885824dc1a0337a5991f559a2974e676aa2d 100644
--- a/common/errors/errors.go
+++ b/common/errors/errors.go
@@ -5,11 +5,15 @@
package errors
import (
+ "errors"
"fmt"
"path/filepath"
"runtime"
)
+// New is a pass-through version of the standard errors.New function.
M-A Ruel 2015/07/22 18:20:36 And what's the purpose?
dnj 2015/07/22 18:30:34 Guess: one can import "...luci-go/common/errors" a
M-A Ruel 2015/07/22 18:32:36 Oh right, I forgot about the package name aliasing
iannucci 2015/07/23 00:44:38 Right... I figured this was easier than fixing the
+var New = errors.New
+
// MarkedError is the specific error type retuned by MakeMarkFn. It's designed
// so that you can access the underlying object if needed.
type MarkedError struct {
« no previous file with comments | « no previous file | common/errors/errors_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698