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

Unified Diff: common/errors/transient.go

Issue 1637193002: common/prpc, tools/cmd/cproto: prpc client (Closed) Base URL: https://github.com/luci/luci-go@prpc-server
Patch Set: Add some content length tests. 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..4fbef6cfe4a5637fb1b60784b70a853b9fc410c5 100644
--- a/common/errors/transient.go
+++ b/common/errors/transient.go
@@ -17,10 +17,19 @@ type transientWrapper struct {
error
}
+var _ interface {
+ Transient
+ Wrapped
+} = 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