aboutsummaryrefslogtreecommitdiffstats
path: root/core/error.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/error.go')
-rw-r--r--core/error.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/error.go b/core/error.go
index 514cd076b..04e40646c 100644
--- a/core/error.go
+++ b/core/error.go
@@ -146,3 +146,19 @@ func IsKnownBlockErr(e error) bool {
_, ok := e.(*KnownBlockError)
return ok
}
+
+type ValueTransferError struct {
+ message string
+}
+
+func ValueTransferErr(str string, v ...interface{}) *ValueTransferError {
+ return &ValueTransferError{fmt.Sprintf(str, v...)}
+}
+
+func (self *ValueTransferError) Error() string {
+ return self.message
+}
+func IsValueTransferErr(e error) bool {
+ _, ok := e.(*ValueTransferError)
+ return ok
+}