From 73c9514b6e62a7afa13fa6bb9a5ef9b8b380a64a Mon Sep 17 00:00:00 2001 From: jiangjiazhi Date: Thu, 28 Apr 2016 15:59:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=A7=E5=A6=87=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=A0=B9=E6=8D=AE=E6=97=A5=E6=9C=9F=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/lyms/platform/common/base/ExceptionHandlerController.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platform-common/src/main/java/com/lyms/platform/common/base/ExceptionHandlerController.java b/platform-common/src/main/java/com/lyms/platform/common/base/ExceptionHandlerController.java index 31e5874..dfc775b 100644 --- a/platform-common/src/main/java/com/lyms/platform/common/base/ExceptionHandlerController.java +++ b/platform-common/src/main/java/com/lyms/platform/common/base/ExceptionHandlerController.java @@ -4,6 +4,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.http.HttpStatus; @@ -113,14 +114,14 @@ public class ExceptionHandlerController { @ResponseStatus(HttpStatus.OK) @ExceptionHandler(Exception.class) - public void buildException(HttpServletResponse httpServletResponse, Exception e) { + public void buildException(HttpServletResponse httpServletResponse, Exception e,HttpServletRequest httpServletRequest) { try { setHttpResponseHeader(httpServletResponse); Map resultMap = new HashMap<>(); resultMap.put("errorcode", ErrorCodeConstants.SYSTEM_ERROR); resultMap.put("errormsg", "服务器异常."); httpServletResponse.getWriter().print(JsonUtil.obj2JsonString(resultMap)); - ExceptionUtils.catchException(e, "ExceptionHandlerController Exception."); + ExceptionUtils.catchException(e, "ExceptionHandlerController Exception. queryStr: "+httpServletRequest.getQueryString()); } catch (Exception ex) { ExceptionUtils.catchException(ex, "ExceptionHandlerController Write response With handException."); } -- 1.8.3.1