rpc-go/client/error.go
crusader 02c99d388e ing
2018-04-29 18:14:10 +09:00

24 lines
323 B
Go

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 {
if nil == e.Err {
return ""
}
return e.Err.Error()
}