private String cleanupMessage(Object message) {

		if (message == null) {
			return null;
		}

		// prevent excessive message degenerate cases
		int maxChars = 1000;
		String messageString = message.toString();
		String safeMessage = StringUtilities.trimMiddle(messageString, maxChars);

		// wrap any poorly formatted text that gets displayed in the label; 80-100 chars is
		// a reasonable line length based on historical print margins
		messageString = wrap(safeMessage);

		return messageString;
	}
Error dialog used to append exceptions.

<p>While this dialog is showing all new exceptions will be added to the dialog.  When
this dialog is closed, this reference will be cleared.

<p>Note: all use of this variable <b>must be on the Swing thread</b> to avoid thread
visibility issues.
Ghidra/Framework/Docking/src/main/java/docking/DockingErrorDisplay.java