spring-framework / org.springframework.scheduling.annotation / AsyncResult / forExecutionException

forExecutionException

open static fun <V : Any> forExecutionException(ex: Throwable): ListenableFuture<V>

Create a new async result which exposes the given exception as an ExecutionException from Future#get().

Parameters

ex - the exception to expose (either an pre-built ExecutionException or a cause to be wrapped in an ExecutionException)

Since
4.2

See Also
ExecutionException