From 2531a82606cdcc96ee468cb0bdd0f0265cf9930e Mon Sep 17 00:00:00 2001 From: Daniel Naber Date: Sat, 13 May 2006 13:29:22 +0000 Subject: [PATCH] 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 --- src/java/org/apache/lucene/store/MMapDirectory.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/lucene/store/MMapDirectory.java b/src/java/org/apache/lucene/store/MMapDirectory.java index 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; }