aboutsummaryrefslogtreecommitdiffstats
path: root/poi-integration/src/test/java/org/apache/poi/stress/OPCFileHandler.java
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2021-07-14 21:53:22 +0000
committerPJ Fanning <fanningpj@apache.org>2021-07-14 21:53:22 +0000
commitc104890f334612d9045b03d48b15ed2689f6444b (patch)
tree70a1065926b96f4798de8d58a1f11681534238af /poi-integration/src/test/java/org/apache/poi/stress/OPCFileHandler.java
parent94813022b9cdd2d12b4e170e3395b7d74ab773fd (diff)
downloadpoi-c104890f334612d9045b03d48b15ed2689f6444b.tar.gz
poi-c104890f334612d9045b03d48b15ed2689f6444b.zip
add extra debug logging to failing tests
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1891554 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-integration/src/test/java/org/apache/poi/stress/OPCFileHandler.java')
-rw-r--r--poi-integration/src/test/java/org/apache/poi/stress/OPCFileHandler.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/poi-integration/src/test/java/org/apache/poi/stress/OPCFileHandler.java b/poi-integration/src/test/java/org/apache/poi/stress/OPCFileHandler.java
index 2bbd9fc70a..e5493d01bd 100644
--- a/poi-integration/src/test/java/org/apache/poi/stress/OPCFileHandler.java
+++ b/poi-integration/src/test/java/org/apache/poi/stress/OPCFileHandler.java
@@ -36,7 +36,12 @@ class OPCFileHandler extends AbstractFileHandler {
// ignore password protected files
if (POIXMLDocumentHandler.isEncrypted(stream)) return;
- OPCPackage p = OPCPackage.open(stream);
+ OPCPackage p;
+ try {
+ p = OPCPackage.open(stream);
+ } catch (Exception e) {
+ throw new RuntimeException("Failed to open '" + path + "' as OPCPackage", e);
+ }
for (PackagePart part : p.getParts()) {
if (part.getPartName().toString().equals("/docProps/core.xml")) {