Commit 7a73a53dcebdf602be03080ff9f72b69fe501985
1 parent
7e7b57ff8c
Exists in
master
and in
1 other branch
处理掉客户端取消连接的异常
Showing 1 changed file with 4 additions and 2 deletions
platform-common/src/main/java/com/lyms/platform/common/base/ExceptionHandlerController.java
View file @
7a73a53
... | ... | @@ -126,7 +126,7 @@ |
126 | 126 | Map<String, Object> resultMap = new HashMap<>(); |
127 | 127 | resultMap.put("errorcode", ErrorCodeConstants.PARAMETER_ERROR); |
128 | 128 | resultMap.put("errormsg", missRequestParameter.getMessage()); |
129 | - ExceptionUtils.catchException(missRequestParameter, "ExceptionHandlerController handlMissingServletRequestParameter."+httpServletRequest.getRequestURI() + "?"+httpServletRequest.getQueryString()); | |
129 | + ExceptionUtils.catchException(missRequestParameter, "ExceptionHandlerController handlMissingServletRequestParameter." + httpServletRequest.getRequestURI() + "?" + httpServletRequest.getQueryString()); | |
130 | 130 | return resultMap; |
131 | 131 | } |
132 | 132 | |
... | ... | @@ -150,7 +150,9 @@ |
150 | 150 | Map<String, Object> resultMap = new HashMap<>(); |
151 | 151 | resultMap.put("errorcode", ErrorCodeConstants.SYSTEM_ERROR); |
152 | 152 | resultMap.put("errormsg", "服务器异常."); |
153 | - ExceptionUtils.catchException(e, "ExceptionHandlerController Exception. queryStr: " +httpServletRequest.getRequestURI() + "?"+httpServletRequest.getQueryString()); | |
153 | + if(!e.getClass().getName() .equals("org.apache.catalina.connector.ClientAbortException") ){ | |
154 | + ExceptionUtils.catchException(e, "ExceptionHandlerController Exception. queryStr: " +httpServletRequest.getRequestURI() + "?"+httpServletRequest.getQueryString()); | |
155 | + } | |
154 | 156 | |
155 | 157 | return resultMap; |
156 | 158 | } |