|
@@ -43,11 +43,11 @@ public class GlobalExceptionHandler
|
|
|
public Response businessException(CustomException e)
|
|
|
{
|
|
|
log.error(e.getMessage(), e);
|
|
|
- if (StringUtils.isNull(e.getCode()))
|
|
|
- {
|
|
|
- return Response.error().setMsg((e.getMessage()));
|
|
|
- }
|
|
|
- return Response.error().setCode(e.getCode()).setMsg(e.getMessage());
|
|
|
+// if (StringUtils.isNull(e.getCode()))
|
|
|
+// {
|
|
|
+// return Response.error().setMsg((e.getMessage()));
|
|
|
+// }
|
|
|
+ return Response.error().setCode(ResponseEnum.BUSINESS_ERROR.getCode()).setMsg(e.getMessage());
|
|
|
}
|
|
|
|
|
|
@ExceptionHandler(NoHandlerFoundException.class)
|
|
@@ -107,12 +107,12 @@ public class GlobalExceptionHandler
|
|
|
return Response.error().setMsg(message);
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 演示模式异常
|
|
|
- */
|
|
|
- @ExceptionHandler(DemoModeException.class)
|
|
|
- public Response demoModeException(DemoModeException e)
|
|
|
- {
|
|
|
- return Response.error(ResponseEnum.DEMO_MODE);
|
|
|
- }
|
|
|
+// /**
|
|
|
+// * 演示模式异常
|
|
|
+// */
|
|
|
+// @ExceptionHandler(DemoModeException.class)
|
|
|
+// public Response demoModeException(DemoModeException e)
|
|
|
+// {
|
|
|
+// return Response.error(ResponseEnum.DEMO_MODE);
|
|
|
+// }
|
|
|
}
|