public static Throwable unwrapThrowable(Throwable e) {
		Throwable exc = e;
		while (exc instanceof CompletionException || exc instanceof ExecutionException) {
			exc = exc.getCause();
		}
		return exc;
	}
Unwrap {@link CompletionException}s and {@link ExecutionException}s to get the real cause

@param e the (usually wrapped) exception
@return the nearest cause in the chain that is not a {@link CompletionException}
Ghidra/Framework/Generic/src/main/java/ghidra/async/AsyncUtils.java