Skip to content

Apache Lucene open-source search software

change from RuntimeException (Exception e) to RuntimeException (String s) to be backward compatible with jdk 1.3

Bernhard Messer1515574bff1f
diff --git a/src/java/org/apache/lucene/index/SegmentReader.java b/src/java/org/apache/lucene/index/SegmentReader.java
index 9e6ba66cbf3..7d69a05fc17 100644
--- a/src/java/org/apache/lucene/index/SegmentReader.java
+++ b/src/java/org/apache/lucene/index/SegmentReader.java
@@ -100,7 +100,7 @@ class SegmentReader extends IndexReader {
SegmentReader.class.getName());
IMPL = Class.forName(name);
} catch (ClassNotFoundException e) {
- throw new RuntimeException(e);
+ throw new RuntimeException("cannot load SegmentReader class: " + e.getMessage());
}
}
@@ -123,7 +123,7 @@ class SegmentReader extends IndexReader {
try {
instance = (SegmentReader)IMPL.newInstance();
} catch (Exception e) {
- throw new RuntimeException(e);
+ throw new RuntimeException("cannot load SegmentReader class: " + e.getMessage());
}
instance.init(dir, sis, closeDir, ownDir);
instance.initialize(si);
diff --git a/src/java/org/apache/lucene/store/FSDirectory.java b/src/java/org/apache/lucene/store/FSDirectory.java
index 82e3ed5ed6a..f82ecc28ea9 100644
--- a/src/java/org/apache/lucene/store/FSDirectory.java
+++ b/src/java/org/apache/lucene/store/FSDirectory.java
@@ -65,7 +65,7 @@ public class FSDirectory extends Directory {
FSDirectory.class.getName());
IMPL = Class.forName(name);
} catch (ClassNotFoundException e) {
- throw new RuntimeException(e);
+ throw new RuntimeException("cannot load FSDirectory class: " + e.getMessage());
}
}
@@ -115,7 +115,7 @@ public class FSDirectory extends Directory {
try {
dir = (FSDirectory)IMPL.newInstance();
} catch (Exception e) {
- throw new RuntimeException(e);
+ throw new RuntimeException("cannot load FSDirectory class: " + e.getMessage());
}
dir.init(file, create);
DIRECTORIES.put(file, dir);