private void addCauseException(Throwable currentThrowable, PrintWriter writer) {
		Throwable theCause = currentThrowable.getCause();
		if (theCause == null) {
			return;
		}

		String defaultMessage = theCause.getClass().getSimpleName();
		String message = theCause.getMessage();
		message = message == null ? defaultMessage : message;
		writer.append("\nCaused By:\n");
		writer.append('\t').append(message).append('\n');

		StackTraceElement[] causeByTrace = theCause.getStackTrace();
		causeByTrace = filterTrace(causeByTrace);
		printTrace(causeByTrace, writer);

		addCauseException(theCause, writer);
	}
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