admin
2022-08-25 264b5dea5b74c4b5ba54a90caba7e709858a037e
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
package com.yeshi.buwan.exception.user;
 
public class RegisterUserException extends Exception {
 
    //参数不完整
    public final static int CODE_PARAMS_NOT_ENOUGH = 1;
 
    //用户已存在
    public final static int CODE_USER_EXIST = 20;
 
    //用户被封禁
    public final static int CODE_FORBIDDEN = 101;
 
 
    private int code;
    private String msg;
 
    public RegisterUserException(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
 
 
    public RegisterUserException(String msg) {
        this.msg = msg;
    }
 
    public String getMsg() {
        return msg;
    }
 
    public int getCode() {
        return code;
    }
 
    @Override
    public String getMessage() {
        return msg;
    }
}