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
This commit is contained in:
Dominik Stadler 2016-02-21 20:41:56 +00:00
parent bc716a2796
commit 10f46da1ae
1 changed files with 3 additions and 1 deletions

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