admin
2025-02-20 f537abe9f3646c739beaf15076246a2f71a347e9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package com.yeshi.buwan.exception.user;
 
public class LoginUserException extends Exception {
 
 
    //参数不完整
    public final static int CODE_PARAMS_NOT_ENOUGH = 1;
 
    //密码错误
    public final static int CODE_PWD_WRONG = 10;
 
    //用户不存在
    public final static int CODE_NO_USER = 20;
 
    //用户被封禁
    public final static int CODE_FORBIDDEN = 101;
 
 
    private int code;
    private String msg;
 
    public LoginUserException(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
 
 
    public LoginUserException(String msg) {
        this.msg = msg;
    }
 
    public String getMsg() {
        return msg;
    }
 
    public int getCode() {
        return code;
    }
 
    @Override
    public String getMessage() {
        return msg;
    }
}