aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/messages.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-03-29 03:42:45 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-03-29 03:42:45 +0800
commitb9ca5eef585a6bc5f3233cfcc7c0a641a046e7c4 (patch)
tree388b087271aeca6a8e163f2adf221dbee783ea0d /rpc/messages.go
parent696ff43db3e6d5261aba92df82f7602d5d82e964 (diff)
parent43d521e90e9516429dd0499ff88bf3f37ec78c48 (diff)
downloaddexon-b9ca5eef585a6bc5f3233cfcc7c0a641a046e7c4.tar
dexon-b9ca5eef585a6bc5f3233cfcc7c0a641a046e7c4.tar.gz
dexon-b9ca5eef585a6bc5f3233cfcc7c0a641a046e7c4.tar.bz2
dexon-b9ca5eef585a6bc5f3233cfcc7c0a641a046e7c4.tar.lz
dexon-b9ca5eef585a6bc5f3233cfcc7c0a641a046e7c4.tar.xz
dexon-b9ca5eef585a6bc5f3233cfcc7c0a641a046e7c4.tar.zst
dexon-b9ca5eef585a6bc5f3233cfcc7c0a641a046e7c4.zip
Merge pull request #579 from tgerring/rpcargs
RPC Args
Diffstat (limited to 'rpc/messages.go')
-rw-r--r--rpc/messages.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/rpc/messages.go b/rpc/messages.go
index 7f5ebab11..5c498234f 100644
--- a/rpc/messages.go
+++ b/rpc/messages.go
@@ -21,6 +21,22 @@ import (
"fmt"
)
+type InvalidTypeError struct {
+ method string
+ msg string
+}
+
+func (e *InvalidTypeError) Error() string {
+ return fmt.Sprintf("invalid type on field %s: %s", e.method, e.msg)
+}
+
+func NewInvalidTypeError(method, msg string) *InvalidTypeError {
+ return &InvalidTypeError{
+ method: method,
+ msg: msg,
+ }
+}
+
type InsufficientParamsError struct {
have int
want int