code: private void throwIf() throws IOException, SolrServerException {
  
  		final Exception last = batchWriteException;
  		batchWriteException = null;
  
  		if(last == null) {
  			return;
  		}
  		if(last instanceof SolrServerException) {
  			throw (SolrServerException) last;
  		}
  		if(last instanceof IOException) {
  			throw (IOException) last;
  		}
  		throw new IOException("Batch Write Failure", last);
  	}
docs: Throw a legal exception if a previous batch write had an exception. The previous state is cleared. Uses
  {@link #batchWriteException} for the state from the last exception.
  
  This will loose individual exceptions if the exceptions happen rapidly.
  
  @throws IOException
  @throws SolrServerException