private String buildStackTraceString() {

		String m = generateMessge();

		StringWriter stringWriter = new StringWriter();
		PrintWriter writer = new PrintWriter(stringWriter);
		writer.append(m);
		writer.append('\n');

		StackTraceElement[] trace = t.getStackTrace();
		trace = filterTrace(trace);
		printTrace(trace, writer);

		addAllCauseExceptions(writer);

		if (testThreadTrace != null) {
			writer.append("\nTest thread stack at that time:\n");
			printTrace(testThreadTrace, writer);
		}

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