Selaa lähdekoodia

持久化抛异常

wangliang 2 vuotta sitten
vanhempi
commit
5d290b9984

+ 5 - 1
themis-mq/src/main/java/com/qmth/themis/mq/service/impl/MqLogicServiceImpl.java

@@ -686,7 +686,11 @@ public class MqLogicServiceImpl implements MqLogicService {
             tmRocketMessageService.saveMqMessageSuccess(mqDto, key);
         } catch (Exception e) {
             log.error(SystemConstant.LOG_ERROR, e);
-            throw new RuntimeException(e);
+            if (e instanceof BusinessException) {
+                throw new BusinessException(e.getMessage());
+            } else {
+                throw new RuntimeException(e);
+            }
         }
     }