Package com.sun.javatest
Class JavaTestError
java.lang.Object
java.lang.Throwable
java.lang.Error
com.sun.javatest.JavaTestError
- All Implemented Interfaces:
Serializable
Special error class to be used for errors which may pop out of JT Harness and
be seen by the user.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJavaTestError
(I18NResourceBundle i18n, String key) Constructs a JavaTestError object with an I18N string as the message.JavaTestError
(I18NResourceBundle i18n, String key, Object arg) Constructs a JavaTestError object with an I18N string as the message.JavaTestError
(I18NResourceBundle i18n, String key, Object... args) Constructs a JavaTestError object with an I18N string as the message.JavaTestError
(I18NResourceBundle i18n, String key, Object[] args, Throwable original) Constructs a JavaTestError object with an I18N string as the message and the error or exception which caused this error to be thrown.JavaTestError
(I18NResourceBundle i18n, String key, Object arg, Throwable original) Constructs a JavaTestError object with an I18N string as the message and the error or exception which caused this error to be thrown.JavaTestError
(I18NResourceBundle i18n, String key, Throwable original) Constructs a JavaTestError object with an I18N string as the message and the error or exception which caused this error to be thrown.Constructs a JavaTestError object with a literal string as the message text.JavaTestError
(String s, Throwable original) Constructs a JavaTestError object with a literal string as the message text.JavaTestError
(Throwable original) Constructs a JavaTestError object to be thrown when an unexpected exception has been caught. -
Method Summary
Modifier and TypeMethodDescriptionIf available, find out what error or exception caused JT Harness to create this object and to throw it.void
void
void
static void
Print out a message when an unexpected exception has been caught.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
-
Field Details
-
original
The original problem. Useful if you need the stack trace.
-
-
Constructor Details
-
JavaTestError
Constructs a JavaTestError object with a literal string as the message text. You should ensure that the string you supply here is subject to I18N.- Parameters:
s
- Literal string to use as the message text.
-
JavaTestError
Constructs a JavaTestError object with a literal string as the message text. You should ensure that the string you supply here is subject to I18N.- Parameters:
s
- Literal string to use as the message text.original
- The exception which originally caused the problem.
-
JavaTestError
Constructs a JavaTestError object to be thrown when an unexpected exception has been caught.- Parameters:
original
- The exception which originally caused the problem.- See Also:
-
JavaTestError
Constructs a JavaTestError object with an I18N string as the message.- Parameters:
i18n
- The resource bundle to get the message text from.key
- The key to access the resource bundle.
-
JavaTestError
Constructs a JavaTestError object with an I18N string as the message.- Parameters:
i18n
- The resource bundle to get the message text from.key
- The key to access the resource bundle.arg
- Item to be substituted into the internationalized string.
-
JavaTestError
Constructs a JavaTestError object with an I18N string as the message.- Parameters:
i18n
- The resource bundle to get the message text from.key
- The key to access the resource bundle.args
- Items to be substituted into the internationalized string.
-
JavaTestError
Constructs a JavaTestError object with an I18N string as the message and the error or exception which caused this error to be thrown. The original throwable will probably be something like an IOException object.- Parameters:
i18n
- The resource bundle to get the message text from.key
- The key to access the resource bundle.original
- The problem which ultimately caused this error.
-
JavaTestError
Constructs a JavaTestError object with an I18N string as the message and the error or exception which caused this error to be thrown. The original throwable will probably be something like an IOException object.- Parameters:
i18n
- The resource bundle to get the message text from.key
- The key to access the resource bundle.arg
- Item to be substituted into the internationalized string.original
- The problem which ultimately caused this error.
-
JavaTestError
Constructs a JavaTestError object with an I18N string as the message and the error or exception which caused this error to be thrown. The original throwable will probably be something like an IOException object.- Parameters:
i18n
- The resource bundle to get the message text from.key
- The key to access the resource bundle.args
- Items to be substituted into the internationalized string.original
- The problem which ultimately caused this error.
-
-
Method Details
-
unexpectedException
Print out a message when an unexpected exception has been caught.- Parameters:
t
- The exception that was caught.- See Also:
-
printStackTrace
public void printStackTrace()- Overrides:
printStackTrace
in classThrowable
-
printStackTrace
- Overrides:
printStackTrace
in classThrowable
-
printStackTrace
- Overrides:
printStackTrace
in classThrowable
-
getOriginalFault
If available, find out what error or exception caused JT Harness to create this object and to throw it.- Returns:
- The original Throwable object that this object was created in response to. May be null if there was none.
-