private BulkImportResponse executeBulkImportInternal()

in bulkimport/src/main/java/com/microsoft/azure/documentdb/bulkimport/DocumentBulkImporter.java [405:423]


    private BulkImportResponse executeBulkImportInternal(Collection<String> input,
            boolean isUpsert) throws DocumentClientException {
        Preconditions.checkNotNull(input, "document collection cannot be null");
        try {
            return executeBulkImportAsyncImpl(input, isUpsert).get();

        } catch (ExecutionException e) {
            logger.debug("Failed to import documents", e);
            Throwable cause = e.getCause();
            if (cause instanceof Exception) {
                throw toDocumentClientException((Exception) cause);
            } else {
                throw toDocumentClientException(e);
            }
        } catch(Exception e) {
            logger.error("Failed to import documents", e);
            throw toDocumentClientException(e);
        }
    }