X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fyaz4j%2FResultSet.java;h=b2fd11958beb65d303f0ceef91cf1afcf7cfa3e3;hb=8c7413fbaf0870975229e8e101f79096b5dfe6f0;hp=2dc3e504095985aef3e8402347ad80dea1b005e6;hpb=ec11eeeb5288f7d1048aed90874cd896468159d4;p=yaz4j-moved-to-github.git diff --git a/src/main/java/org/yaz4j/ResultSet.java b/src/main/java/org/yaz4j/ResultSet.java index 2dc3e50..b2fd119 100644 --- a/src/main/java/org/yaz4j/ResultSet.java +++ b/src/main/java/org/yaz4j/ResultSet.java @@ -94,6 +94,10 @@ public class ResultSet implements Iterable { List out = new ArrayList(count); SWIGTYPE_p_p_ZOOM_record_p recs = yaz4jlib.new_zoomRecordArray(count); yaz4jlib.ZOOM_resultset_records(resultSet, recs, start, count); + ZoomException err = this.conn.getZoomException(); + if (err != null) { + throw err; + } for (int i = 0; i < count; i++) { SWIGTYPE_p_ZOOM_record_p record = yaz4jlib.zoomRecordArray_getitem(recs, i); @@ -134,6 +138,13 @@ public class ResultSet implements Iterable { }; } + /** + * + * @param type + * @param spec + * @return + * @throws ZoomException + */ public ResultSet sort(String type, String spec) throws ZoomException { int ret = yaz4jlib.ZOOM_resultset_sort1(resultSet, type, spec); if (ret != 0) throw new ZoomException("Sorting resultset failed");