DeviceRuntimeException
public
class
DeviceRuntimeException
extends HarnessRuntimeException
| java.lang.Object | |||||
| ↳ | java.lang.Throwable | ||||
| ↳ | java.lang.Exception | ||||
| ↳ | java.lang.RuntimeException | ||||
| ↳ | 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)
|
|
公共构造函数
DeviceRuntimeException
public DeviceRuntimeException (String msg,
ErrorIdentifier errorId)| 参数 | |
|---|---|
msg |
String:错误的描述性错误消息。 |
errorId |
ErrorIdentifier:对异常进行分类的 ErrorIdentifier。 |
DeviceRuntimeException
public DeviceRuntimeException (String msg,
Throwable t,
ErrorIdentifier errorId)| 参数 | |
|---|---|
msg |
String:错误的描述性错误消息 |
t |
Throwable:应封装在 DeviceRuntimeException 中的 Throwable。 |
errorId |
ErrorIdentifier:对异常进行分类的 ErrorIdentifier。 |