@Override
	public AttributedString createAnnotatedString(AttributedString prototypeString, String[] text,
			Program program) throws AnnotationException {
		return new AttributedString(errorText, Messages.ERROR, prototypeString.getFontMetrics(0));
	}
An annotated string handler that is used to display an error message string when there is a
problem creating an annotated string.
Ghidra/Features/Base/src/main/java/ghidra/app/util/viewer/field/InvalidAnnotatedStringHandler.java