@Override public T next() { if ( !hasNext() ) { throw new NoSuchElementException(); } currentRowRead = true; T element; try { element = createElement( rs ); } catch ( SQLException e ) { // try to close everything close(); // wrap as unchecked exception throw new RuntimeException( e.getMessage(), e ); } return element; }