From 358850ad6fbbca29bd8a738a7cdf53a4566603d5 Mon Sep 17 00:00:00 2001 From: Ziyear <31235089+Ziyear@users.noreply.github.com> Date: Tue, 20 Aug 2019 17:29:36 +0800 Subject: [PATCH] =?UTF-8?q?#1164=20=E5=BE=AE=E4=BF=A1=E6=94=AF=E4=BB=98?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E5=8E=BB=E9=99=A4=E4=B8=80=E4=BA=9B=E5=A4=9A?= =?UTF-8?q?=E4=BD=99=E7=9A=84=E9=94=99=E8=AF=AF=E6=97=A5=E5=BF=97=E8=BE=93?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wxpay/service/impl/BaseWxPayServiceImpl.java | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java index d2805c06..0033fad4 100644 --- a/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java +++ b/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl/BaseWxPayServiceImpl.java @@ -142,10 +142,8 @@ public abstract class BaseWxPayServiceImpl implements WxPayService { result.checkResult(this, this.getConfig().getSignType(), false); return result; } catch (WxPayException e) { - log.error(e.getMessage(), e); throw e; } catch (Exception e) { - log.error(e.getMessage(), e); throw new WxPayException("发生异常," + e.getMessage(), e); } } @@ -158,7 +156,6 @@ public abstract class BaseWxPayServiceImpl implements WxPayService { log.debug("微信支付退款异步通知解析后的对象:{}", result); return result; } catch (Exception e) { - log.error(e.getMessage(), e); throw new WxPayException("发生异常," + e.getMessage(), e); } } @@ -172,10 +169,8 @@ public abstract class BaseWxPayServiceImpl implements WxPayService { result.checkResult(this, this.getConfig().getSignType(), false); return result; } catch (WxPayException e) { - log.error(e.getMessage(), e); throw e; } catch (Exception e) { - log.error(e.getMessage(), e); throw new WxPayException("发生异常," + e.getMessage(), e); } @@ -527,13 +522,12 @@ public abstract class BaseWxPayServiceImpl implements WxPayService { throw WxPayException.from(BaseWxPayResult.fromXML(new String(responseBytes, StandardCharsets.UTF_8), WxPayCommonResult.class)); } else { - this.log.error("解压zip文件出错", e); + throw new WxPayException("解压zip文件出错," + e.getMessage(), e); } } } catch (Exception e) { - this.log.error("解析对账单文件时出错", e); + throw new WxPayException("解析对账单文件时出错," + e.getMessage(), e); } - return null; } @@ -582,15 +576,13 @@ public abstract class BaseWxPayServiceImpl implements WxPayService { throw WxPayException.from(BaseWxPayResult.fromXML(new String(responseBytes, StandardCharsets.UTF_8), WxPayCommonResult.class)); } else { - this.log.error("解压zip文件出错", e); - throw new WxPayException("解压zip文件出错"); + throw new WxPayException("解压zip文件出错", e); } } } catch (WxPayException wxPayException) { throw wxPayException; } catch (Exception e) { - this.log.error("解析对账单文件时出错", e); - throw new WxPayException("解压zip文件出错"); + throw new WxPayException("解压zip文件出错",e); } }