From 59ff5a7b7aef6578ea1f8bcc19aff3567de7da1c Mon Sep 17 00:00:00 2001 From: Chao <200615@gmail.com> Date: Wed, 14 Mar 2018 20:23:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=93=E6=9C=89rpc=20error=20=E5=8F=91?= =?UTF-8?q?=E7=94=9F=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8C=E6=8A=8Aerror?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E4=B9=9F=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rpcClient.go | 1 + 1 file changed, 1 insertion(+) diff --git a/rpcClient.go b/rpcClient.go index f5e7e16..b631594 100644 --- a/rpcClient.go +++ b/rpcClient.go @@ -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 }