public static String getSwingThreadTraceString(Throwable throwable) {
		StackTraceElement[] trace = throwable.getStackTrace();
		StackTraceElement[] filtered =
			ReflectionUtilities.filterStackTrace(trace, SWING_STACK_ELEMENT_PATTERNS);

		String className = throwable.getClass().getSimpleName();
		String message = throwable.getMessage();

		if (message != null) {
			message = className + ": " + message;
		}
		else {
			message = className;
		}

		StringWriter stringWriter = new StringWriter();
		PrintWriter writer = new PrintWriter(stringWriter);

		writer.append(message);
		writer.append('\n');

		printTrace(filtered, writer);

		return stringWriter.toString();
	}
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