線束異常

public class HarnessException
extends Object implements IHarnessException

java.lang.Object
com.android.tradefed.error.HarnessException


線束內引發的異常的基底異常類別。該類別幫助攜帶ErrorIdentifier來報告失敗詳細資訊。

概括

公共構造函數

HarnessException ( ErrorIdentifier errorId)
HarnessException (String message, ErrorIdentifier errorId)
HarnessException (Throwable cause, ErrorIdentifier errorId)
HarnessException (String message, Throwable cause, ErrorIdentifier errorId)

公共方法

ErrorIdentifier getErrorId ()

傳回與異常關聯的ErrorIdentifier

String getOrigin ()

傳回異常的起源。

String toString ()

受保護的方法

final void setCallerClass (Class<?> clazz)
final void setCallerClass (String clazz)

公共構造函數

線束異常

public HarnessException (ErrorIdentifier errorId)

參數
errorId ErrorIdentifier

線束異常

public HarnessException (String message, 
                ErrorIdentifier errorId)

參數
message String

errorId ErrorIdentifier

線束異常

public HarnessException (Throwable cause, 
                ErrorIdentifier errorId)

參數
cause Throwable

errorId ErrorIdentifier

線束異常

public HarnessException (String message, 
                Throwable cause, 
                ErrorIdentifier errorId)

參數
message String

cause Throwable

errorId ErrorIdentifier

公共方法

取得錯誤ID

public ErrorIdentifier getErrorId ()

傳回與異常關聯的ErrorIdentifier 。可以為空。

退貨
ErrorIdentifier

取得原點

public String getOrigin ()

傳回異常的起源。

退貨
String

到字串

public String toString ()

退貨
String

受保護的方法

設定調用者類

protected final void setCallerClass (Class<?> clazz)

參數
clazz Class

設定調用者類

protected final void setCallerClass (String clazz)

參數
clazz String