Skip to content

Commit 392429a

Browse files
committed
为WxErrorException添加一个构造方法,用于必要时打印出错误根源信息
1 parent f2655e5 commit 392429a

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎weixin-java-common/src/main/java/me/chanjar/weixin/common/exception/WxErrorException.java‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ public WxErrorException(WxError error) {
1313
this.error = error;
1414
}
1515

16+
public WxErrorException(WxError error, Throwable cause) {
17+
super(error.toString(), cause);
18+
this.error = error;
19+
}
20+
1621
public WxError getError() {
1722
return this.error;
1823
}

0 commit comments

Comments
 (0)