init the cause of exceptions so no information is lost when this exception occurs

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@406096 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Daniel Naber 2006-05-13 13:29:22 +00:00
parent af791e009b
commit 2531a82606

View File

@ -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;
}