From ef84fc49568a440f933545bfac3abb0cb3501249 Mon Sep 17 00:00:00 2001 From: orbiter Date: Thu, 29 Jun 2006 07:56:27 +0000 Subject: [PATCH] added IOException to size() and row() git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2256 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/dbtest.java | 4 ++-- source/de/anomic/kelondro/kelondroIndex.java | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) 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;