設備運行時異常
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 。 |