From a1b57be652ac532ebddb3e3e53dddc35ae420f31 Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Fri, 25 Nov 2011 05:27:15 +0100 Subject: empty java stacktrace for soffice crashers, they are not interesting anyway --- .../source/java/org/openoffice/test/OfficeConnection.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'unotest/source/java') diff --git a/unotest/source/java/org/openoffice/test/OfficeConnection.java b/unotest/source/java/org/openoffice/test/OfficeConnection.java index 54a412d8ce21..8f990764ef2e 100644 --- a/unotest/source/java/org/openoffice/test/OfficeConnection.java +++ b/unotest/source/java/org/openoffice/test/OfficeConnection.java @@ -48,7 +48,13 @@ import static org.junit.Assert.*; org.openoffice.test.arg.... system properties. */ + public final class OfficeConnection { + private final class PostprocessFailedException extends java.lang.RuntimeException { + PostprocessFailedException() { + super("This likely means that soffice crashed during the test."); + } + }; /** Start up an OOo instance. */ public void setUp() throws Exception { @@ -159,7 +165,14 @@ public final class OfficeConnection { Forward pperrForward = new Forward(postprocess.getErrorStream(), System.err); pperrForward.start(); postprocess.waitFor(); - assertEquals(0, postprocess.exitValue()); + if(postprocess.exitValue() != 0) + { + // no ugly long java stacktrace needed here + PostprocessFailedException e = new PostprocessFailedException(); + StackTraceElement[] newStackTrace = new StackTraceElement[0]; + e.setStackTrace(newStackTrace); + throw e; + } } } catch(IOException e) {} -- cgit