設備運作時異常

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中的Throwable

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