优化WxError类的toString方法,避免输出重复内容

This commit is contained in:
BinaryWang 2016-08-01 09:16:09 +08:00
parent 65fb373c39
commit 49d561c117

View File

@ -50,7 +50,10 @@ public class WxError implements Serializable {
@Override
public String toString() {
return "微信错误: errcode=" + errorCode + ", errmsg=" + errorMsg + "\njson:" + json;
if(json != null){
return json;
}
return "错误: Code=" + errorCode + ", Msg=" + errorMsg;
}
public static Builder newBuilder(){