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 TestReportingException
fromSwingThread
(String message, Throwable t) Creates a newTestReportingException
using an exception that was generated on the Swing thread.static String
getSwingThreadTraceString
(Throwable throwable) void
void
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getSuppressed, initCause, printStackTrace, setStackTrace, toString
-
Method Details
-
fromSwingThread
Creates a newTestReportingException
using 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:
printStackTrace
in classThrowable
-
printStackTrace
- Overrides:
printStackTrace
in classThrowable
-
getStackTrace
- Overrides:
getStackTrace
in classThrowable
-
getMessage
- Overrides:
getMessage
in classThrowable
-