DeviceRuntimeException

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

公用建構函式

DeviceRuntimeException

public DeviceRuntimeException (String msg, 
                ErrorIdentifier errorId)

建立 DeviceRuntimeException

參數
msg String:錯誤的說明性錯誤訊息。

errorId ErrorIdentifier:將例外狀況分類的 ErrorIdentifier

DeviceRuntimeException

public DeviceRuntimeException (String msg, 
                Throwable t, 
                ErrorIdentifier errorId)

建立 DeviceRuntimeException

參數
msg String:錯誤的描述性錯誤訊息

t Throwable:應在 DeviceRuntimeException 中包裝的 Throwable

errorId ErrorIdentifier:將例外狀況分類的 ErrorIdentifier