public static TestReportingException fromSwingThread(String message, Throwable t) {

		StackTraceElement[] testThreadTrace = null;
		if (TestThread.isTestThread()) {
			Throwable testThrowable =
				ReflectionUtilities.createThrowableWithStackOlderThan(TestReportingException.class);
			testThreadTrace = testThrowable.getStackTrace();
			testThreadTrace = TestThread.filterTrace(testThreadTrace);

			StackTraceElement[] awtThreadTrace = t.getStackTrace();
			awtThreadTrace = TestThread.filterTrace(awtThreadTrace);
			t.setStackTrace(awtThreadTrace);
		}

		TestReportingException e =
			new TestReportingException("AWT-EventQueue-0", t, testThreadTrace);
		e.userMessage = message;
		return e;
	}
Creates a new {@link TestReportingException} using an exception that was generated on 
the Swing thread.

@param message an optional custom message that will be printed first in the stack trace
@param t the original exception
@return the new {@link TestReportingException}
Ghidra/Framework/Generic/src/main/java/generic/test/TestReportingException.java