]> source.dussan.org Git - poi.git/commitdiff
Include stacktrace of inner exception when block-positions are invalid in POIFSFileSystem
authorDominik Stadler <centic@apache.org>
Sun, 21 Feb 2016 20:41:56 +0000 (20:41 +0000)
committerDominik Stadler <centic@apache.org>
Sun, 21 Feb 2016 20:41:56 +0000 (20:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1731560 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java

index 71d39546d07a1aa6fde098453a59a410116c152c..cb88f2d55635befd8e31dff975320f6cb22b0779 100644 (file)
@@ -483,7 +483,9 @@ public class NPOIFSFileSystem extends BlockStore
        try {
            return _data.read(bigBlockSize.getBigBlockSize(), startAt);
        } catch (IndexOutOfBoundsException e) {
-           throw new IndexOutOfBoundsException("Block " + offset + " not found - " + e);
+           IndexOutOfBoundsException wrapped = new IndexOutOfBoundsException("Block " + offset + " not found");
+           wrapped.initCause(e);
+           throw wrapped;
        }
     }