Package generic.test
Class TestReportingException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
generic.test.TestReportingException
- All Implemented Interfaces:
Serializable
A
RuntimeException that will print a custom stack trace.
This class will print not only the trace info for the exception passed at construction time, but will also print a trace for the test thread at the time of the exception. Also, the trace information printed will be filtered of entries that are not useful for debugging, like Java class entries.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic TestReportingExceptionfromSwingThread(String message, Throwable t) Creates a newTestReportingExceptionusing an exception that was generated on the Swing thread.static StringgetSwingThreadTraceString(Throwable throwable) voidvoidMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getSuppressed, initCause, printStackTrace, setStackTrace, toString
-
Method Details
-
fromSwingThread
Creates a newTestReportingExceptionusing an exception that was generated on the Swing thread.- Parameters:
message- an optional custom message that will be printed first in the stack tracet- the original exception- Returns:
- the new
TestReportingException
-
getSwingThreadTraceString
-
printStackTrace
- Overrides:
printStackTracein classThrowable
-
printStackTrace
- Overrides:
printStackTracein classThrowable
-
getStackTrace
- Overrides:
getStackTracein classThrowable
-
getMessage
- Overrides:
getMessagein classThrowable
-