public Tuple getNext() throws NoSuchElementException, TransactionAbortedException { try { Tuple tuple = new Tuple(td); for (int i = 0; i < td.numFields(); i++) { IntField intf = IntField.createIntField(in.readInt()); tuple.setField(i, intf); } return tuple; } catch (EOFException eof) { throw new NoSuchElementException(eof.getMessage()); } catch (Exception e) { e.printStackTrace(); BufferPool.Instance().abortTransaction(tid); closeConnection(); throw new TransactionAbortedException(e); } }