懒羊羊
2023-08-30 71e81ed1d12e4d69f53c8ad9e066650ad4186293
提交 | 用户 | 时间
71e81e 1 package cn.stylefeng.guns.base.auth.exception;
2
3 import cn.stylefeng.roses.kernel.model.exception.AbstractBaseExceptionEnum;
4 import lombok.Data;
5
6 /**
7  * 认证失败(账号密码错误,账号被冻结,token过期等)
8  *
9  * @author fengshuonan
10  * @Date 2019/7/18 22:18
11  */
12 @Data
13 public class AuthException extends RuntimeException {
14
15     private Integer code;
16     private String errorMessage;
17
18     public AuthException() {
19         super("认证失败!");
20         this.code = 500;
21         this.errorMessage = "认证失败!";
22     }
23
24     public AuthException(AbstractBaseExceptionEnum exception) {
25         super(exception.getMessage());
26         this.code = exception.getCode();
27         this.errorMessage = exception.getMessage();
28     }
29
30 }