Fix error handling in ResultSet#getRecords
[yaz4j-moved-to-github.git] / src / main / java / org / yaz4j / Connection.java
index a47ad3a..4accb99 100644 (file)
@@ -200,6 +200,16 @@ public class Connection {
     yaz4jlib.ZOOM_connection_close(zoomConnection);
     closed = true;
   }
+  
+  /**
+   * Return exception type from current connection
+   *
+   * @return null if no error
+   */
+  ZoomException getZoomException() {
+    ZoomException err = ExceptionUtil.getError(zoomConnection, host, port);
+    return err;
+  }
 
   /**
    * Write option with a given name.