List<Throwable> exceptions = new ArrayList<Throwable>();
int index = 0;
int size = futures.size();
while (index < size) {
try {
Future<?> future = completionExecutor.take();
future.get();
} catch (InterruptedException e) {
exceptions.add(e);
} catch (ExecutionException e) {
exceptions.add(e);