code: public int[] executeBatch() throws SQLException {
          final int[] cs = new int[batch.size()];
          java.util.Arrays.fill(cs, EXECUTE_FAILED);
  
          final boolean cont = 
              "true".equals(connection.getProperties().
                            get("acolyte.batch.continueOnError"));
  
          SQLException firstEx = null;  // if |cont| is true
          SQLException lastEx = null;
  
          int i = 0;
          for (final ImmutablePair<String,TreeMap<Integer,Parameter>> b : batch) {
              try {
                  cs[i++] = update(b.right).left;
              } catch (SQLException se) {
                  if (!cont) throw new BatchUpdateException(se.getMessage(), se.getSQLState(), se.getErrorCode(), cs, se.getCause());
                  else {
                      if (firstEx == null) firstEx = se;
                      if (lastEx != null) lastEx.setNextException(se);
                      lastEx = se;
                  } // end of else
              } // end of catch
          } // end of for
  
          if (firstEx != null) throw new BatchUpdateException(firstEx.getMessage(), firstEx.getSQLState(), firstEx.getErrorCode(), cs, firstEx.getCause());
  
          return cs;
      }
docs: {@inheritDoc}