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(String message, Throwable cause, ErrorIdentifier errorId)
|
|
HarnessException(Throwable cause, ErrorIdentifier errorId)
|
|
公用方法 | |
|---|---|
ErrorIdentifier
|
getErrorId()
傳回與例外狀況相關聯的 |
String
|
getOrigin()
傳回例外狀況的來源。 |
String
|
toString()
|
受保護的方法 | |
|---|---|
final
void
|
setCallerClass(Class<?> clazz)
|
final
void
|
setCallerClass(String clazz)
|
公用建構函式
HarnessException
public HarnessException (String message,
ErrorIdentifier errorId)| 參數 | |
|---|---|
message |
String |
errorId |
ErrorIdentifier |
HarnessException
public HarnessException (String message,
Throwable cause,
ErrorIdentifier errorId)| 參數 | |
|---|---|
message |
String |
cause |
Throwable |
errorId |
ErrorIdentifier |
HarnessException
public HarnessException (Throwable cause,
ErrorIdentifier errorId)| 參數 | |
|---|---|
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 |