| | |
| | | return new RestResponse<>(SystemCode.ParameterValidError.getCode(), errorMsg); |
| | | } |
| | | |
| | | @ExceptionHandler(QuestionException.class) |
| | | @ResponseBody |
| | | public RestResponse handler(QuestionException e) { |
| | | logger.error(e.getMessage(), e); |
| | | return new RestResponse<>(SystemCode.QuestionError.getCode(), SystemCode.QuestionError.getMessage()); |
| | | } |
| | | |
| | | @ExceptionHandler(RuntimeException.class) |
| | | @ResponseBody |
| | | public RestResponse handlerRuntimeException(RuntimeException e) { |
| | | logger.error(e.getMessage(), e); |
| | | return new RestResponse<>(SystemCode.InnerError.getCode(), e.getMessage()); |
| | | } |
| | | } |