]> source.dussan.org Git - poi.git/commitdiff
More helpful output if a re-write test fails
authorNick Burch <nick@apache.org>
Mon, 13 Jul 2015 18:00:28 +0000 (18:00 +0000)
committerNick Burch <nick@apache.org>
Mon, 13 Jul 2015 18:00:28 +0000 (18:00 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1690780 13f79535-47bb-0310-9956-ffa450edef68

src/testcases/org/apache/poi/hssf/model/TestDrawingAggregate.java

index ca8e255c1325d31c86f6f0331445f26d1a77dc24..c62c36522317683ebc38a01138cf146e27e5518a 100644 (file)
@@ -51,8 +51,6 @@ import org.apache.poi.util.HexRead;
  * @author Evgeniy Berlog\r
  */\r
 public class TestDrawingAggregate extends TestCase {\r
-\r
-\r
     /**\r
      *  information about drawing aggregate in a worksheet\r
      */\r
@@ -189,7 +187,15 @@ public class TestDrawingAggregate extends TestCase {
                 // System.out.println("[WARN]  Cannot read " + file.getName());\r
                 continue;\r
             }\r
-            assertWriteAndReadBack(wb);\r
+            try {\r
+                assertWriteAndReadBack(wb);\r
+            } catch (Exception e) {\r
+                String filename = file.getName();\r
+                System.out.println("Drawing Aggregate re-write test failed for " + filename);\r
+                e.printStackTrace(System.out);\r
+                \r
+                fail("Error when writing and re-reading workbook " + filename + "\n" + e);\r
+            }\r
         }\r
     }\r
 \r