hxb
2024-10-24 ce88de4891b87c3b7b2750575e15d6e48d518852
HDLLinkPMSdk/src/main/java/com/hdl/linkpm/sdk/core/exception/HDLLinkCopyException.java
New file
@@ -0,0 +1,63 @@
package com.hdl.linkpm.sdk.core.exception;
import androidx.annotation.NonNull;
/**
 * Created by Tong on 2021/11/11.
 */
public class HDLLinkCopyException extends RuntimeException {
    private int code = 0;
    private String msg = "";
    private Throwable rawThrowable;
    public HDLLinkCopyException() {
    }
    public HDLLinkCopyException(String msg) {
        this.msg = msg;
    }
    public HDLLinkCopyException(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public HDLLinkCopyException(int code) {
        this.code = code;
    }
    public HDLLinkCopyException(Throwable rawThrowable) {
        this.rawThrowable = rawThrowable;
    }
    public int getCode() {
        return code;
    }
    public void setCode(int code) {
        this.code = code;
    }
    public @NonNull
    String getMsg() {
        return msg;
    }
    public void setMsg(String msg) {
        this.msg = msg;
    }
    public Throwable getRawThrowable() {
        return rawThrowable;
    }
    public void setRawThrowable(Throwable rawThrowable) {
        this.rawThrowable = rawThrowable;
    }
    public static HDLLinkCopyException getErrorWithCode(int code, String msg){
        return new HDLLinkCopyException(code,msg);
    }
}