hxb
2024-10-24 ce88de4891b87c3b7b2750575e15d6e48d518852
HDLLinkPMSdk/src/main/java/com/hdl/linkpm/sdk/core/exception/HDLErrorCode.java
New file
@@ -0,0 +1,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;
    }
}