Add exception details and fix expected exceptions to make tests run again git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1911503 13f79535-47bb-0310-9956-ffa450edef68tags/REL_5_2_4
@@ -286,7 +286,7 @@ public class XWPFDocument extends POIXMLDocument implements Document, IBody { | |||
} | |||
} | |||
} catch (ClassCastException e) { | |||
throw new IllegalArgumentException("Relation and type of document-part did not match, had relation " + relation + " and type of document-part: " + p.getClass()); | |||
throw new IllegalArgumentException("Relation and type of document-part did not match, had relation " + relation + " and type of document-part: " + p.getClass(), e); | |||
} | |||
} | |||
initHyperlinks(); |
@@ -251,7 +251,7 @@ public final class Chunks implements ChunkGroupWithProperties { | |||
allChunks.computeIfAbsent(prop, k -> new ArrayList<>()); | |||
allChunks.get(prop).add(chunk); | |||
} catch (ClassCastException e) { | |||
throw new IllegalArgumentException("Property and type of chunk did not match, had property " + prop + " and type of chunk: " + chunk.getClass()); | |||
throw new IllegalArgumentException("Property and type of chunk did not match, had property " + prop + " and type of chunk: " + chunk.getClass(), e); | |||
} | |||
} | |||