mirror of
https://github.com/arnaucube/go-ethereum.git
synced 2026-02-28 05:56:45 +01:00
rpc, xeth: fix #881, gracefully handle offline whisper
This commit is contained in:
16
rpc/types.go
16
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user