I have the following code snippet that basically scans through the list of task that needs to be executed and each task is then given to the executor for execution.
When you submit a task to the executor, it returns you a FutureTask instance.
FutureTask.get() will re-throw any exception thrown by the task as an ExecutorException.
ExecutorException
So when you iterate through the List and call get on each, catch ExecutorException and invoke an orderly shutdown.
List