rpc, xeth: fix #881, gracefully handle offline whisper

This commit is contained in:
Péter Szilágyi
2015-05-11 11:53:53 +03:00
parent 00280e62e3
commit 0ad5898c0f
4 changed files with 53 additions and 2 deletions

View File

@ -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
}