sean.zhou
2022-03-21 17835b967b48f2676cce3bbed081c6580602ee1c
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.dji.sample.common.error;
 
/**
 * @author sean.zhou
 * @version 0.1
 * @date 2021/11/25
 */
public enum CommonErrorEnum implements IErrorInfo {
 
    SYSTEM_ERROR(600500, "system error"),
 
    SECRET_INVALID(600100, "secret invalid"),
 
    NO_TOKEN(600101, "accss_token is null"),
 
    TOKEN_EXPIRED(600102, "token is expired"),
 
    TOKEN_INVALID(600103, "token invalid"),
 
    SIGN_INVALID(600104, "sign invalid");
 
    private String msg;
 
    private int code;
 
    CommonErrorEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
 
    @Override
    public String getErrorMsg() {
        return this.msg;
    }
 
    @Override
    public Integer getErrorCode() {
        return this.code;
    }
}