Skip to content

Commit

Permalink
当有rpc error 发生的时候,把error结果也返回
Browse files Browse the repository at this point in the history
  • Loading branch information
dydysy committed Mar 14, 2018
1 parent 885990d commit 59ff5a7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions rpcClient.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ func (c *rpcClient) call(method string, params interface{}) (rr rpcResponse, err
}
if rErr.Message != "" { //当有rpc error 发生的时候,把error结果也返回
rr.Err = rErr
err = errors.New(fmt.Sprintf("%v : %v", rr.Err.Code, rr.Err.Message))
}
return
}

0 comments on commit 59ff5a7

Please sign in to comment.