HarnessException

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)

公用建構函式

HarnessException

public HarnessException (ErrorIdentifier errorId)

參數
errorId ErrorIdentifier

HarnessException

public HarnessException (String message, 
                ErrorIdentifier errorId)

參數
message String

errorId ErrorIdentifier

HarnessException

public HarnessException (Throwable cause, 
                ErrorIdentifier errorId)

參數
cause Throwable

errorId ErrorIdentifier

HarnessException

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

參數
message String

cause Throwable

errorId ErrorIdentifier

公用方法

getErrorId

public ErrorIdentifier getErrorId ()

傳回與例外狀況相關的 ErrorIdentifier。可以是空值。

傳回
ErrorIdentifier

getOrigin

public String getOrigin ()

傳回例外狀況的來源。

傳回
String

toString

public String toString ()

傳回
String

保護方法

setCallerClass

protected final void setCallerClass (Class<?> clazz)

參數
clazz Class

setCallerClass

protected final void setCallerClass (String clazz)

參數
clazz String