From: Dominik Stadler Date: Sun, 21 Feb 2016 20:41:56 +0000 (+0000) Subject: Include stacktrace of inner exception when block-positions are invalid in POIFSFileSystem X-Git-Tag: REL_3_14_FINAL~23 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e89cb5544da9c01f9945eb9fdf456cfee342ead3;p=poi.git Include stacktrace of inner exception when block-positions are invalid in POIFSFileSystem git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1731560 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java b/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java index 71d39546d0..cb88f2d556 100644 --- a/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java +++ b/src/java/org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java @@ -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; } }