You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 10:19:44 UTC

[sling-org-apache-sling-testing-osgi-mock] 02/12: cosmetic: beautify error messages when setup/teardown fails

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.testing.osgi-mock-1.6.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-osgi-mock.git

commit 1e64d07a61dbde82d400348bc274137cbd152779
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Thu Sep 3 22:45:43 2015 +0000

    cosmetic: beautify error messages when setup/teardown fails
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/osgi-mock@1701144 13f79535-47bb-0310-9956-ffa450edef68
---
 .../java/org/apache/sling/testing/mock/osgi/junit/OsgiContext.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/sling/testing/mock/osgi/junit/OsgiContext.java b/src/main/java/org/apache/sling/testing/mock/osgi/junit/OsgiContext.java
index a3c4201..cd527b1 100644
--- a/src/main/java/org/apache/sling/testing/mock/osgi/junit/OsgiContext.java
+++ b/src/main/java/org/apache/sling/testing/mock/osgi/junit/OsgiContext.java
@@ -90,7 +90,7 @@ public final class OsgiContext extends OsgiContextImpl implements TestRule {
             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 OsgiContextImpl implements TestRule {
             try {
                 this.tearDownCallback.execute(this);
             } catch (Throwable ex) {
-                throw new RuntimeException("Executing setup callback failed.", ex);
+                throw new RuntimeException("Teardown failed: " + ex.getMessage(), ex);
             }
         }
     }

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.