You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ce...@apache.org on 2014/11/26 22:11:02 UTC
svn commit: r1641940 -
/poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java
Author: centic
Date: Wed Nov 26 21:11:02 2014
New Revision: 1641940
URL: http://svn.apache.org/r1641940
Log:
Include root-cause exception information when constructing ContentTypeManager fails
Modified:
poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java
Modified: poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java?rev=1641940&r1=1641939&r2=1641940&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/openxml4j/opc/internal/ContentTypeManager.java Wed Nov 26 21:11:02 2014
@@ -101,8 +101,12 @@ public abstract class ContentTypeManager
try {
parseContentTypesFile(in);
} catch (InvalidFormatException e) {
- throw new InvalidFormatException(
- "Can't read content types part !");
+ InvalidFormatException ex = new InvalidFormatException("Can't read content types part !");
+
+ // here it is useful to add the cause to not loose the original stack-trace
+ ex.initCause(e);
+
+ throw ex;
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org