Browse Source

为WxErrorException添加一个构造方法,用于必要时打印出错误根源信息

master
Binary Wang 8 years ago
parent
commit
392429a476
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      weixin-java-common/src/main/java/me/chanjar/weixin/common/exception/WxErrorException.java

+ 5
- 0
weixin-java-common/src/main/java/me/chanjar/weixin/common/exception/WxErrorException.java View File

@@ -13,6 +13,11 @@ public class WxErrorException extends Exception {
this.error = error; this.error = error;
} }


public WxErrorException(WxError error, Throwable cause) {
super(error.toString(), cause);
this.error = error;
}

public WxError getError() { public WxError getError() {
return this.error; return this.error;
} }


Loading…
Cancel
Save