public boolean hasErrors() { return bulkWriteBatchCombiner.hasErrors(); }
private void throwOnError() { if (hasErrors()) { throw getError(); } }
/** * Gets the combined errors as an exception * @return the bulk write exception, or null if there were no errors */ public MongoBulkWriteException getError() { return hasErrors() ? new MongoBulkWriteException(createResult(), new ArrayList<BulkWriteError>(writeErrors), writeConcernErrors.isEmpty() ? null : writeConcernErrors.get(writeConcernErrors.size() - 1), serverAddress) : null; }
public boolean hasErrors() { return bulkWriteBatchCombiner.hasErrors(); }
private void throwOnError() { if (hasErrors()) { throw getError(); } }
/** * Gets the combined errors as an exception * @return the bulk write exception, or null if there were no errors */ public MongoBulkWriteException getError() { return hasErrors() ? new MongoBulkWriteException(createResult(), new ArrayList<BulkWriteError>(writeErrors), writeConcernErrors.isEmpty() ? null : writeConcernErrors.get(writeConcernErrors.size() - 1), serverAddress) : null; }