yeg
2026-08-26 a9e3435464f86a50ffa81a16ef92e47734adef6e
ruoyi-device/src/main/java/com/ruoyi/device/api/DeviceAdapterException.java
@@ -3,14 +3,29 @@
public class DeviceAdapterException extends RuntimeException
{
    private static final long serialVersionUID = 1L;
    private static final String DEFAULT_FAILURE_CODE = "ADAPTER_FAILURE";
    private final String failureCode;
    public DeviceAdapterException(String message)
    {
        super(message);
        this(DEFAULT_FAILURE_CODE, message, null);
    }
    public DeviceAdapterException(String message, Throwable cause)
    {
        this(DEFAULT_FAILURE_CODE, message, cause);
    }
    public DeviceAdapterException(String failureCode, String message, Throwable cause)
    {
        super(message, cause);
        this.failureCode = failureCode;
    }
    /** 返回供业务层持久化和恢复判断使用的稳定失败分类。 */
    public String failureCode()
    {
        return failureCode;
    }
}