Apache Lucene open-source search software
init the cause of exceptions so no information is lost when this exception occurs
Daniel Naber2531a82606cd
diff --git a/src/java/org/apache/lucene/store/MMapDirectory.java b/src/java/org/apache/lucene/store/MMapDirectory.javaindex d71e207c9da..4acf0582e1a 100644--- a/src/java/org/apache/lucene/store/MMapDirectory.java+++ b/src/java/org/apache/lucene/store/MMapDirectory.java@@ -174,7 +174,9 @@ public class MMapDirectory extends FSDirectory {try {clone.seek(getFilePointer());} catch(IOException ioe) {- throw new RuntimeException(ioe);+ RuntimeException newException = new RuntimeException(ioe);+ newException.initCause(ioe);+ throw newException;};return clone;}