catch (ExecutionException e) {
if ( failedUpdates == null ) {
failedUpdates = new LinkedList<LuceneWork>();
}
failedUpdates.add( queue.get( i ) );
errorContextBuilder.errorThatOccurred( e.getCause() );
}
}
if ( failedUpdates != null ) {
errorContextBuilder.addAllWorkThatFailed( failedUpdates );
resources.getErrorHandler().handle( errorContextBuilder.createErrorContext() );