From 6159d4266c8ca2042f1aa77cc739a609c8b218a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Forever=E6=9D=A8?= <453190450@qq.com> Date: Thu, 20 May 2021 14:14:55 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20#2098=20=E4=BF=AE=E5=A4=8D=E8=B0=83?= =?UTF-8?q?=E7=94=A8=E5=BE=AE=E4=BF=A1=E6=8E=A5=E5=8F=A3=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E9=87=8D=E8=AF=95=E9=80=BB=E8=BE=91=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../me/chanjar/weixin/common/error/WxErrorException.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/weixin-java-common/src/main/java/me/chanjar/weixin/common/error/WxErrorException.java b/weixin-java-common/src/main/java/me/chanjar/weixin/common/error/WxErrorException.java index ca6c62611..992081da0 100644 --- a/weixin-java-common/src/main/java/me/chanjar/weixin/common/error/WxErrorException.java +++ b/weixin-java-common/src/main/java/me/chanjar/weixin/common/error/WxErrorException.java @@ -8,8 +8,10 @@ public class WxErrorException extends Exception { private final WxError error; + private static final int DEFAULT_ERROR_CODE = -99; + public WxErrorException(String message) { - this(WxError.builder().errorCode(-1).errorMsg(message).build()); + this(WxError.builder().errorCode(DEFAULT_ERROR_CODE).errorMsg(message).build()); } public WxErrorException(WxError error) { @@ -24,12 +26,10 @@ public class WxErrorException extends Exception { public WxErrorException(Throwable cause) { super(cause.getMessage(), cause); - this.error = WxError.builder().errorCode(-1).errorMsg(cause.getMessage()).build(); + this.error = WxError.builder().errorCode(DEFAULT_ERROR_CODE).errorMsg(cause.getMessage()).build(); } public WxError getError() { return this.error; } - - }