From 8df573dd1ac59497e39eb5dd0103f20696e8c4ea Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Thu, 20 May 2021 15:01:34 +0800
Subject: [PATCH] modify
---
src/main/java/com/xcong/excoin/common/aop/ExceptionCatchAspect.java | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/common/aop/ExceptionCatchAspect.java b/src/main/java/com/xcong/excoin/common/aop/ExceptionCatchAspect.java
index 3ce3ed5..4f838da 100644
--- a/src/main/java/com/xcong/excoin/common/aop/ExceptionCatchAspect.java
+++ b/src/main/java/com/xcong/excoin/common/aop/ExceptionCatchAspect.java
@@ -60,7 +60,7 @@
throw ex;
}
- if (profiles.equals("dev")) {
+ if (profiles.equals("dev") || profiles.equals("test")) {
throw ex;
}
@@ -78,7 +78,13 @@
exceptionData.setSimpleMsg(ex.getMessage());
sysExceptionDetailDao.insert(exceptionData);
- DingTalkUtils.sendMsg(profiles + "--" + ex.getMessage(), exStr.substring(0, 200), exceptionData.getId());
+ String msg = "";
+ if (exStr.length() > 200) {
+ msg = exStr.substring(0, 200);
+ } else {
+ msg = exStr;
+ }
+ DingTalkUtils.sendMsg(profiles + "--" + ex.getMessage(), msg, exceptionData.getId());
} catch (Exception e) {
log.error("exception aop", e);
}
--
Gitblit v1.9.1