private void logApplyErrorMessage(MessageLog log, DemangledObject demangled, Address address,
			Exception exception, String errorString) {

		String message;
		String name;
		if (exception != null) {
			message = ExceptionUtils.getMessage(exception);
			name = StringUtils.EMPTY;
		}
		else if (errorString != null) {
			message = errorString;
			name = StringUtils.EMPTY;
		}
		else {
			// Eventually, if we switch all errors over to being passed by an exception, then
			// we can eliminate this block of code (and not pass null into this method).
			message = "Unknown error at address " + address;
			name = "\n\t" + demangled.getName();
		}

		String className = demangled.getClass().getSimpleName();
		log.appendMsg(getName(), "Apply failure (" + className + ": " + message + ")\n\t" +
			demangled.getMangledString() + name);
	}
Applies the given demangled object to the program

@param mangledContext the mangled context
@param demangled the demangled object
@param log the error log
@param monitor the task monitor
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/AbstractDemanglerAnalyzer.java