From c6d981ffc694cd651f0851bcf2b47b442592fd84 Mon Sep 17 00:00:00 2001 From: liruohrh <2372221537@qq.com> Date: Sat, 6 Apr 2024 13:46:15 +0000 Subject: [PATCH] =?UTF-8?q?=E8=BD=BB=E9=87=8F=E4=BC=98=E5=8C=96:=20?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E6=8F=90=E5=8F=96=E4=B8=80=E4=B8=AA=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E4=BF=A1=E6=81=AF=3D=3D>=E5=8F=AA=E6=8F=90=E5=8F=96?= =?UTF-8?q?=E4=B8=80=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liruohrh <2372221537@qq.com> --- .../java3y/austin/web/exception/ExceptionHandlerAdvice.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/austin-web/src/main/java/com/java3y/austin/web/exception/ExceptionHandlerAdvice.java b/austin-web/src/main/java/com/java3y/austin/web/exception/ExceptionHandlerAdvice.java index 8e8ca1a..461ab6f 100644 --- a/austin-web/src/main/java/com/java3y/austin/web/exception/ExceptionHandlerAdvice.java +++ b/austin-web/src/main/java/com/java3y/austin/web/exception/ExceptionHandlerAdvice.java @@ -26,8 +26,9 @@ public class ExceptionHandlerAdvice { @ExceptionHandler({Exception.class}) @ResponseStatus(HttpStatus.OK) public BasicResultVO exceptionResponse(Exception e) { - log.error(Throwables.getStackTrace(e)); - return BasicResultVO.fail(RespStatusEnum.ERROR_500, "\r\n" + Throwables.getStackTrace(e) + "\r\n"); + String errStackStr = Throwables.getStackTrace(e); + log.error(errStackStr); + return BasicResultVO.fail(RespStatusEnum.ERROR_500, "\r\n" + errStackStr + "\r\n"); } @ExceptionHandler({CommonException.class})