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); } }