设备不可用异常

public class DeviceNotAvailableException
extends HarnessException

java.lang.Object
com.android.tradefed.error.HarnessException
com.android.tradefed.device.DeviceNotAvailableException


当设备不再可用于测试时抛出。例如,与设备的 adb 连接已丢失,设备已停止响应命令等

概括

公共构造函数

DeviceNotAvailableException ()

该构造函数已被弃用。请改用DeviceNotAvailableException(String, String, com.android.tradefed.result.error.ErrorIdentifier)

DeviceNotAvailableException (String msg)

该构造函数已被弃用。请改用DeviceNotAvailableException(String, String, com.android.tradefed.result.error.ErrorIdentifier)

DeviceNotAvailableException (String msg, String serial)

创建一个DeviceNotAvailableException

DeviceNotAvailableException (String msg, String serial, ErrorIdentifier errorId)

创建一个DeviceNotAvailableException

DeviceNotAvailableException (String msg, Throwable cause, String serial)

创建一个DeviceNotAvailableException

DeviceNotAvailableException (String msg, Throwable cause, String serial, ErrorIdentifier errorId)

创建一个DeviceNotAvailableException

公共方法

String getSerial ()

返回与异常关联的设备的序列号。

公共构造函数

设备不可用异常

public DeviceNotAvailableException ()

该构造函数已被弃用。
请改用DeviceNotAvailableException(String, String, com.android.tradefed.result.error.ErrorIdentifier)

创建一个DeviceNotAvailableException

设备不可用异常

public DeviceNotAvailableException (String msg)

该构造函数已被弃用。
请改用DeviceNotAvailableException(String, String, com.android.tradefed.result.error.ErrorIdentifier)

创建一个DeviceNotAvailableException

参数
msg String :描述性消息。

设备不可用异常

public DeviceNotAvailableException (String msg, 
                String serial)

创建一个DeviceNotAvailableException

参数
msg String :描述性消息。

serial String : 相关设备的序列号

设备不可用异常

public DeviceNotAvailableException (String msg, 
                String serial, 
                ErrorIdentifier errorId)

创建一个DeviceNotAvailableException

参数
msg String :描述性消息。

serial String : 相关设备的序列号

errorId ErrorIdentifier :此错误的错误标识符。

设备不可用异常

public DeviceNotAvailableException (String msg, 
                Throwable cause, 
                String serial)

创建一个DeviceNotAvailableException

参数
msg String :描述性消息。

cause Throwable :导致设备不可用的根Throwable

serial String : 异常所涉及设备的序列号

设备不可用异常

public DeviceNotAvailableException (String msg, 
                Throwable cause, 
                String serial, 
                ErrorIdentifier errorId)

创建一个DeviceNotAvailableException

参数
msg String :描述性消息。

cause Throwable :导致设备不可用的根Throwable

serial String : 异常所涉及设备的序列号

errorId ErrorIdentifier :此错误的错误标识符。

公共方法

获取序列号

public String getSerial ()

返回与异常关联的设备的序列号。

退货
String