Author: sseifert Date: Thu Sep 3 22:45:43 2015 New Revision: 1701144 URL: http://svn.apache.org/r1701144 Log: cosmetic: beautify error messages when setup/teardown fails
Modified: sling/trunk/testing/mocks/osgi-mock/src/main/java/org/apache/sling/testing/mock/osgi/junit/OsgiContext.java sling/trunk/testing/mocks/sling-mock/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContext.java Modified: sling/trunk/testing/mocks/osgi-mock/src/main/java/org/apache/sling/testing/mock/osgi/junit/OsgiContext.java URL: http://svn.apache.org/viewvc/sling/trunk/testing/mocks/osgi-mock/src/main/java/org/apache/sling/testing/mock/osgi/junit/OsgiContext.java?rev=1701144&r1=1701143&r2=1701144&view=diff ============================================================================== --- sling/trunk/testing/mocks/osgi-mock/src/main/java/org/apache/sling/testing/mock/osgi/junit/OsgiContext.java (original) +++ sling/trunk/testing/mocks/osgi-mock/src/main/java/org/apache/sling/testing/mock/osgi/junit/OsgiContext.java Thu Sep 3 22:45:43 2015 @@ -90,7 +90,7 @@ public final class OsgiContext extends O try { this.setUpCallback.execute(this); } catch (Throwable ex) { - throw new RuntimeException("Executing setup callback failed.", ex); + throw new RuntimeException("Setup failed: " + ex.getMessage(), ex); } } } @@ -100,7 +100,7 @@ public final class OsgiContext extends O try { this.tearDownCallback.execute(this); } catch (Throwable ex) { - throw new RuntimeException("Executing setup callback failed.", ex); + throw new RuntimeException("Teardown failed: " + ex.getMessage(), ex); } } } Modified: sling/trunk/testing/mocks/sling-mock/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContext.java URL: http://svn.apache.org/viewvc/sling/trunk/testing/mocks/sling-mock/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContext.java?rev=1701144&r1=1701143&r2=1701144&view=diff ============================================================================== --- sling/trunk/testing/mocks/sling-mock/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContext.java (original) +++ sling/trunk/testing/mocks/sling-mock/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContext.java Thu Sep 3 22:45:43 2015 @@ -132,7 +132,7 @@ public final class SlingContext extends try { this.setUpCallback.execute(this); } catch (Throwable ex) { - throw new RuntimeException("Executing setup callback failed.", ex); + throw new RuntimeException("Setup failed: " + ex.getMessage(), ex); } } } @@ -142,7 +142,7 @@ public final class SlingContext extends try { this.tearDownCallback.execute(this); } catch (Throwable ex) { - throw new RuntimeException("Executing setup callback failed.", ex); + throw new RuntimeException("Teardown failed: " + ex.getMessage(), ex); } } }