From 99701274f83bc7c54beedfe7e18577e9d6b7198e Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期一, 17 六月 2024 11:20:55 +0800
Subject: [PATCH] 阅卷、bug

---
 src/main/java/com/ycl/jxkg/config/spring/exception/ExceptionHandle.java |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/ycl/jxkg/config/spring/exception/ExceptionHandle.java b/src/main/java/com/ycl/jxkg/config/spring/exception/ExceptionHandle.java
index 10eeea8..4f1977a 100644
--- a/src/main/java/com/ycl/jxkg/config/spring/exception/ExceptionHandle.java
+++ b/src/main/java/com/ycl/jxkg/config/spring/exception/ExceptionHandle.java
@@ -51,6 +51,20 @@
     }
 
     /**
+     * Handler rest response.
+     *
+     * @param e the e
+     * @return the rest response
+     */
+    @ExceptionHandler(RuntimeException.class)
+    @ResponseBody
+    public Result handler(RuntimeException e, HttpServletRequest request) {
+        String errMsg = String.format("绯荤粺寮傚父-%s", e.getMessage());
+        this.printExceptionLocation(e, request, errMsg);
+        return new Result<>(SystemCode.InnerError.getCode(), e.getMessage());
+    }
+
+    /**
      * JSON浼犲弬鏁版嵁鏍¢獙寮傚父
      *
      * @param e

--
Gitblit v1.8.0