From 2f614900e82036e3e8f6f6a714efc43e09aca830 Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 15 Sep 2014 01:11:01 +0200 Subject: Updated GHOST --- ethchain/error.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'ethchain/error.go') 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 -- cgit v1.2.3