This commit is contained in:
crusader 2018-04-29 18:14:10 +09:00
parent ec8c352d5f
commit 02c99d388e
3 changed files with 7 additions and 1 deletions

View File

@ -16,5 +16,8 @@ type Error struct {
}
func (e *Error) Error() string {
if nil == e.Err {
return ""
}
return e.Err.Error()
}

View File

@ -39,6 +39,9 @@ func (rs *requestState) isCanceled() bool {
}
func (rs *requestState) setError(err error) {
if nil == err {
return
}
rs.clientError = newError(rs.method, rs.params, err)
}

View File

@ -29,7 +29,7 @@ func (crc *ClientResponseCodec) ID() interface{} {
func (crc *ClientResponseCodec) Result(result interface{}) error {
if nil == crc.res.Error && nil != crc.res.Result {
if err := json.Unmarshal(*crc.res.Result, result); nil != err {
if err := json.Unmarshal(*crc.res.Result, &result); nil != err {
return err
}
return nil