driver-core/src/main/com/mongodb/connection/BulkWriteBatchCombiner.java
public MongoBulkWriteException getError() {
        return hasErrors() ? new MongoBulkWriteException(createResult(),
                                                    new ArrayList<BulkWriteError>(writeErrors),
                                                    writeConcernErrors.isEmpty() ? null
                                                                                 : writeConcernErrors.get(writeConcernErrors.size() - 1),
                                                    serverAddress) : null;
    }
public MongoBulkWriteException getError() {
        return hasErrors() ? new MongoBulkWriteException(createResult(),
                                                    new ArrayList<BulkWriteError>(writeErrors),
                                                    writeConcernErrors.isEmpty() ? null
                                                                                 : writeConcernErrors.get(writeConcernErrors.size() - 1),
                                                    serverAddress) : null;
    }
public MongoBulkWriteException getError ( ) { return hasErrors ( ) ? new MongoBulkWriteException ( createResult ( ) , new ArrayList < BulkWriteError > ( writeErrors ) , writeConcernErrors . isEmpty ( ) ? null : writeConcernErrors . get ( writeConcernErrors . size ( ) - 1 ) , serverAddress ) : null ; }
Gets the combined errors as an exception
@return the bulk write exception, or null if there were no errors
Gets the combined errors as an exception