Package generic.test
Class TestReportingException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- generic.test.TestReportingException
-
- All Implemented Interfaces:
java.io.Serializable
public class TestReportingException extends java.lang.RuntimeException
ARuntimeException
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:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TestReportingException
fromSwingThread(java.lang.String message, java.lang.Throwable t)
Creates a newTestReportingException
using an exception that was generated on the Swing thread.java.lang.String
getMessage()
java.lang.StackTraceElement[]
getStackTrace()
static java.lang.String
getSwingThreadTraceString(java.lang.Throwable throwable)
void
printStackTrace(java.io.PrintStream s)
void
printStackTrace(java.io.PrintWriter s)
-
-
-
Method Detail
-
fromSwingThread
public static TestReportingException fromSwingThread(java.lang.String message, java.lang.Throwable t)
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
public static java.lang.String getSwingThreadTraceString(java.lang.Throwable throwable)
-
printStackTrace
public void printStackTrace(java.io.PrintStream s)
- Overrides:
printStackTrace
in classjava.lang.Throwable
-
printStackTrace
public void printStackTrace(java.io.PrintWriter s)
- Overrides:
printStackTrace
in classjava.lang.Throwable
-
getStackTrace
public java.lang.StackTraceElement[] getStackTrace()
- Overrides:
getStackTrace
in classjava.lang.Throwable
-
getMessage
public java.lang.String getMessage()
- Overrides:
getMessage
in classjava.lang.Throwable
-
-