|
|
|
@ -23,10 +23,10 @@ public class GlobalErrorController { |
|
|
|
*/ |
|
|
|
@ExceptionHandler(ChException.class) |
|
|
|
@ResponseBody |
|
|
|
public JSONObject aisHandler(ChException ais){ |
|
|
|
log.error("Exception:"+ais); |
|
|
|
public JSONObject aisHandler(ChException ex){ |
|
|
|
log.error("Exception:"+ex); |
|
|
|
jsonObject.put("code",500); |
|
|
|
jsonObject.put("msg",ais.getMsg()); |
|
|
|
jsonObject.put("msg",ex.getMsg()); |
|
|
|
return jsonObject; |
|
|
|
} |
|
|
|
|
|
|
|
@ -38,7 +38,7 @@ public class GlobalErrorController { |
|
|
|
@ExceptionHandler(value =NullPointerException.class) |
|
|
|
@ResponseBody |
|
|
|
public JSONObject exceptionHandler(NullPointerException e){ |
|
|
|
log.error("空指针异常:"+e.getStackTrace()); |
|
|
|
log.error("空指针异常:"+e); |
|
|
|
String msg = e.getMessage()==null?"module not found!":e.getMessage(); |
|
|
|
jsonObject.put("code",500); |
|
|
|
jsonObject.put("msg",msg); |
|
|
|
|