rpc-go/client/error.go

24 lines
323 B
Go
Raw Permalink Normal View History

2018-04-11 14:16:41 +00:00
package client
func newError(method string, params []interface{}, err error) *Error {
return &Error{
Method: method,
Params: params,
Err: err,
}
}
type Error struct {
Method string
Params []interface{}
Err error
}
func (e *Error) Error() string {
2018-04-29 09:14:10 +00:00
if nil == e.Err {
return ""
}
2018-04-11 14:16:41 +00:00
return e.Err.Error()
}