aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/error.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-09-15 07:11:01 +0800
committerobscuren <geffobscura@gmail.com>2014-09-15 07:11:01 +0800
commit2f614900e82036e3e8f6f6a714efc43e09aca830 (patch)
tree6a9ad17e8f7f7f91c036d2fec2354d08a0025a6e /ethchain/error.go
parent4db4ec1621767513ed2bd99d835c3e2f1c2b0e7e (diff)
downloaddexon-2f614900e82036e3e8f6f6a714efc43e09aca830.tar
dexon-2f614900e82036e3e8f6f6a714efc43e09aca830.tar.gz
dexon-2f614900e82036e3e8f6f6a714efc43e09aca830.tar.bz2
dexon-2f614900e82036e3e8f6f6a714efc43e09aca830.tar.lz
dexon-2f614900e82036e3e8f6f6a714efc43e09aca830.tar.xz
dexon-2f614900e82036e3e8f6f6a714efc43e09aca830.tar.zst
dexon-2f614900e82036e3e8f6f6a714efc43e09aca830.zip
Updated GHOST
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