public static <T> ThriftFuture<T> exceptionallyCompletedFuture(Throwable cause) {
        requireNonNull(cause, "cause");
        final ThriftFuture<T> future = new ThriftFuture<>();
        future.onError(cause instanceof Exception ? (Exception) cause : new CompletionException(cause));
        return future;
    }
Returns a new {@link ThriftFuture} instance that has an exception set immediately.
thrift/thrift0.13/src/main/java/com/linecorp/armeria/common/thrift/ThriftFuture.java