aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/error.go
diff options
context:
space:
mode:
Diffstat (limited to 'ethchain/error.go')
-rw-r--r--ethchain/error.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/ethchain/error.go b/ethchain/error.go
index 2cf09a1ec..82949141a 100644
--- a/ethchain/error.go
+++ b/ethchain/error.go
@@ -25,6 +25,24 @@ func IsParentErr(err error) bool {
return ok
}
+type UncleErr struct {
+ Message string
+}
+
+func (err *UncleErr) Error() string {
+ return err.Message
+}
+
+func UncleError(str string) error {
+ return &UncleErr{Message: str}
+}
+
+func IsUncleErr(err error) bool {
+ _, ok := err.(*UncleErr)
+
+ return ok
+}
+
// Block validation error. If any validation fails, this error will be thrown
type ValidationErr struct {
Message string