| | |
| | | import com.ruoyi.common.core.exception.BaseException;
|
| | | import com.ruoyi.common.core.exception.CustomException;
|
| | | import com.ruoyi.common.core.exception.DemoModeException;
|
| | | import com.ruoyi.common.core.exception.InnerAuthException;
|
| | | import com.ruoyi.common.core.exception.PreAuthorizeException;
|
| | | import com.ruoyi.common.core.utils.StringUtils;
|
| | | import com.ruoyi.common.core.web.domain.AjaxResult;
|
| | |
| | | @ExceptionHandler(BaseException.class)
|
| | | public AjaxResult baseException(BaseException e)
|
| | | {
|
| | | return AjaxResult.error(e.getMessage());
|
| | | return AjaxResult.error(e.getDefaultMessage());
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | String message = e.getBindingResult().getFieldError().getDefaultMessage();
|
| | | return AjaxResult.error(message);
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * 权限异常
|
| | | */
|
| | |
| | | {
|
| | | return AjaxResult.error("没有权限,请联系管理员授权");
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * 内部认证异常
|
| | | */
|
| | | @ExceptionHandler(InnerAuthException.class)
|
| | | public AjaxResult InnerAuthException(InnerAuthException e)
|
| | | {
|
| | | return AjaxResult.error(e.getMessage());
|
| | | }
|
| | |
|
| | | /**
|
| | | * 演示模式异常
|
| | | */
|