Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

added IOException to size() and row()

orbiteref84fc49568a
diff --git a/source/dbtest.java b/source/dbtest.java
index 4fa6bc065..2c89fa74d 100644
--- a/source/dbtest.java
+++ b/source/dbtest.java
@@ -416,7 +416,7 @@ final class dbTable implements kelondroIndex {
}
}
- public int size() {
+ public int size() throws IOException {
int size = -1;
try {
String sqlQuery = new String
@@ -436,7 +436,7 @@ final class dbTable implements kelondroIndex {
return size;
} catch (Exception e) {
- return -1;
+ throw new IOException(e.getMessage());
}
}
diff --git a/source/de/anomic/kelondro/kelondroIndex.java b/source/de/anomic/kelondro/kelondroIndex.java
index c4aabeef5..0d3459ee7 100644
--- a/source/de/anomic/kelondro/kelondroIndex.java
+++ b/source/de/anomic/kelondro/kelondroIndex.java
@@ -54,10 +54,8 @@ import java.io.IOException;
public interface kelondroIndex {
- public int size();
-
- public kelondroRow row();
-
+ public int size() throws IOException;
+ public kelondroRow row() throws IOException;
public kelondroRow.Entry get(byte[] key) throws IOException;
public kelondroRow.Entry put(kelondroRow.Entry row) throws IOException;
public kelondroRow.Entry remove(byte[] key) throws IOException;