junit.framework
Class TestCase.WrappedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
junit.framework.TestCase.WrappedException
- All Implemented Interfaces:
- Serializable
- Enclosing class:
- TestCase
public static class TestCase.WrappedException
- extends RuntimeException
Exception class to get a checked exception out of a Runnable.
- See Also:
- Serialized Form
Constructor Summary |
TestCase.WrappedException(Throwable cause)
Constructs a new runtime exception with the specified cause and a detail message of (cause==null ? null :
cause.toString()) (which typically contains the class and detail message of cause). |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
TestCase.WrappedException
public TestCase.WrappedException(Throwable cause)
- Constructs a new runtime exception with the specified cause and a detail message of (cause==null ? null :
cause.toString()) (which typically contains the class and detail message of cause). This constructor
is useful for runtime exceptions that are little more than wrappers for other throwables.
- Parameters:
cause
- the cause (which is saved for later retrieval by the Throwable.getCause()
method). (A null
value is permitted, and indicates that the cause is nonexistent or unknown.)- Since:
- 1.4