From e89cb5544da9c01f9945eb9fdf456cfee342ead3 Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Sun, 21 Feb 2016 20:41:56 +0000 Subject: [PATCH] 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 --- .../org/apache/poi/poifs/filesystem/NPOIFSFileSystem.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } } -- 2.39.5