diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-05-11 16:53:53 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-05-11 16:53:53 +0800 |
commit | 0ad5898c0f9b0d777818d89356b74606f4b3c988 (patch) | |
tree | dce4e31dedd9e92f26c5203d0f62dc4ae2d59044 /rpc/types.go | |
parent | 00280e62e3c422b2824a0280015b7b78578ab16d (diff) | |
download | go-tangerine-0ad5898c0f9b0d777818d89356b74606f4b3c988.tar go-tangerine-0ad5898c0f9b0d777818d89356b74606f4b3c988.tar.gz go-tangerine-0ad5898c0f9b0d777818d89356b74606f4b3c988.tar.bz2 go-tangerine-0ad5898c0f9b0d777818d89356b74606f4b3c988.tar.lz go-tangerine-0ad5898c0f9b0d777818d89356b74606f4b3c988.tar.xz go-tangerine-0ad5898c0f9b0d777818d89356b74606f4b3c988.tar.zst go-tangerine-0ad5898c0f9b0d777818d89356b74606f4b3c988.zip |
rpc, xeth: fix #881, gracefully handle offline whisper
Diffstat (limited to 'rpc/types.go')
-rw-r--r-- | rpc/types.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/rpc/types.go b/rpc/types.go index 1784759a4..e6eb4f856 100644 --- a/rpc/types.go +++ b/rpc/types.go @@ -209,6 +209,22 @@ func NewNotImplementedError(method string) *NotImplementedError { } } +type NotAvailableError struct { + Method string + Reason string +} + +func (e *NotAvailableError) Error() string { + return fmt.Sprintf("%s method not available: %s", e.Method, e.Reason) +} + +func NewNotAvailableError(method string, reason string) *NotAvailableError { + return &NotAvailableError{ + Method: method, + Reason: reason, + } +} + type DecodeParamError struct { err string } |