异常处理
This commit is contained in:
parent
f12614199b
commit
07f286322d
|
@ -23,8 +23,9 @@ public class RestControllerExceptionHandler {
|
|||
|
||||
|
||||
@ExceptionHandler(MSException.class)
|
||||
public ResultHolder f2cExceptionHandler(HttpServletRequest request, HttpServletResponse response, MSException e) {
|
||||
response.setStatus(HttpStatus.INTERNAL_SERVER_ERROR.value());
|
||||
public ResultHolder msExceptionHandler(HttpServletRequest request, HttpServletResponse response, MSException e) {
|
||||
// 自定义异常返回200
|
||||
response.setStatus(HttpStatus.OK.value());
|
||||
return ResultHolder.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue