Commit 6076bef3 by qwmqiuwenmin

fix

parent 7ebb360a
......@@ -38,23 +38,23 @@ public class GlobalExceptionHandler extends WebBaseController {
}
@ResponseBody
@ExceptionHandler(RuntimeException.class)
public HaobanResponse ControllerException(HttpServletResponse response, RuntimeException ex) {
HaobanResponse res = new HaobanResponse();
res.setErrorCode(HaoBanErrCode.ERR_3.getCode());
String message = ex.getMessage();
if (message != null && message.indexOf(ShowFrontMessageException.class.getName()) > -1) {
Matcher matcher = pattern.matcher(message);
while (matcher.find()) {
message = (matcher.group(2));
}
} else {
message = HaoBanErrCode.ERR_3.getMsg();
}
res.setMessage(message);
return res;
}
// @ResponseBody
// @ExceptionHandler(RuntimeException.class)
// public HaobanResponse ControllerException(HttpServletResponse response, RuntimeException ex) {
// HaobanResponse res = new HaobanResponse();
// res.setErrorCode(HaoBanErrCode.ERR_3.getCode());
// String message = ex.getMessage();
// if (message != null && message.indexOf(ShowFrontMessageException.class.getName()) > -1) {
// Matcher matcher = pattern.matcher(message);
// while (matcher.find()) {
// message = (matcher.group(2));
// }
// } else {
// message = HaoBanErrCode.ERR_3.getMsg();
// }
// res.setMessage(message);
// return res;
// }
// @ResponseBody
// @ExceptionHandler(Exception.class)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment