设备运行时异常
public class DeviceRuntimeException
extends HarnessRuntimeException
java.lang.Object | ||
↳ | com.android.tradefed.error.HarnessRuntimeException | |
↳ | com.android.tradefed.device.DeviceRuntimeException |
当设备操作未产生预期结果时抛出。
例如:“pm list users”通常会返回用户列表,如果不这样做,则应将其作为 DeviceRuntimeException 引发,因为出现了严重错误。
概括
公共构造函数 | |
---|---|
DeviceRuntimeException (String msg, ErrorIdentifier errorId) 创建一个 | |
DeviceRuntimeException (String msg, Throwable t, ErrorIdentifier errorId) 创建一个 |
公共构造函数
设备运行时异常
public DeviceRuntimeException (String msg, ErrorIdentifier errorId)
创建一个DeviceRuntimeException
。
参数 | |
---|---|
msg | String :错误的描述性错误消息。 |
errorId | ErrorIdentifier :对异常进行分类的ErrorIdentifier 。 |
设备运行时异常
public DeviceRuntimeException (String msg, Throwable t, ErrorIdentifier errorId)
创建一个DeviceRuntimeException
。
参数 | |
---|---|
msg | String : 错误的描述性错误消息 |
t | Throwable :应该包装在DeviceRuntimeException 中的Throwable 。 |
errorId | ErrorIdentifier :对异常进行分类的ErrorIdentifier 。 |