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

Unified Diff: common/errors/transient.go

Issue 1605363002: common/prpc, tools/cmd/cproto: prpc client (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: rebased and addressed comments Created 4 years, 11 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/wrap.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/errors/transient.go
diff --git a/common/errors/transient.go b/common/errors/transient.go
index f15c3a9cadb9a0127b3d04320646681d8de91219..e1d5a6bcffbb460f153dfbd1afbef8c42ad1957b 100644
--- a/common/errors/transient.go
+++ b/common/errors/transient.go
@@ -17,10 +17,17 @@ type transientWrapper struct {
error
}
+var _ Transient = transientWrapper{}
+var _ Wrap = transientWrapper{}
+
func (t transientWrapper) IsTransient() bool {
return true
}
+func (t transientWrapper) InnerError() error {
+ return t.error
+}
+
// IsTransient tests if a given error is Transient.
func IsTransient(err error) bool {
if t, ok := err.(Transient); ok {
« no previous file with comments | « no previous file | common/errors/wrap.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698