設備運行時異常

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

DeviceRuntimeException (String msg, Throwable t, ErrorIdentifier errorId)

創建DeviceRuntimeException

公共構造函數

設備運行時異常

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中的ERROR(/Throwable)

errorId ErrorIdentifier :對異常進行分類的ErrorIdentifier