Where to catch Exceptions thrown from Callable.call() [duplicate] Where to catch Exceptions thrown from Callable.call() [duplicate] multithreading multithreading

Where to catch Exceptions thrown from Callable.call() [duplicate]


AFAIR java.util.concurrent.Future.get() will throw ExecutionException if provided callable threw exception in the past (the exception is stored in the Future).

Exception thrown when attempting to retrieve the result of a task that aborted by throwing an exception. This exception can be inspected using the Throwable.getCause() method.