HarnessException

public class HarnessException
extends Exception implements IHarnessException

java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ 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()

अपवाद से जुड़ा 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 (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