wjc
2023-07-07 22494af577e21a930abef309f2f60c03c9615bd1
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.hdl.linkpm.sdk.core.exception;
 
 
import com.hdl.linkpm.sdk.HDLLinkPMSdk;
 
/**
 * Created by jlchen on 12/2/21.
 */
public enum HDLErrorCode {
    /***网络请求通信自定义错误码**/
    HDL_DATA_PARSING_ERROR(-1000, HDLLinkPMSdk.isZh() == true ? "数据解析异常" : "Data parsing error"),
    /***本地通信自定义错误码**/
    HDL_DATA_ERROR(-2000, HDLLinkPMSdk.isZh() == true ? "参数异常" : "Parameter exception"),
    HDL_DATA_NULL_ERROR(-2001, HDLLinkPMSdk.isZh() == true ? "参数不能为空" : "Parameter cannot be empty"),
    HDL_TIMEOUT_ERROR(-2002, HDLLinkPMSdk.isZh() == true ? "超时" : "timeout");
 
    private String msg;
    private int code;
 
    private HDLErrorCode(int code, String msg) {
        this.msg = msg;
        this.code = code;
    }
 
    public String getMsg() {
        return msg;
    }
 
    public void setMsg(String msg) {
        this.msg = msg;
    }
 
    public int getCode() {
        return code;
    }
 
    public void setCode(int code) {
        this.code = code;
    }
}