You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by gh...@apache.org on 2019/01/18 13:18:19 UTC

svn commit: r1851618 - /felix/trunk/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/executor/HealthCheckFuture.java

Author: ghenzler
Date: Fri Jan 18 13:18:19 2019
New Revision: 1851618

URL: http://svn.apache.org/viewvc?rev=1851618&view=rev
Log:
FELIX-5952 slightly better error handling

Modified:
    felix/trunk/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/executor/HealthCheckFuture.java

Modified: felix/trunk/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/executor/HealthCheckFuture.java
URL: http://svn.apache.org/viewvc/felix/trunk/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/executor/HealthCheckFuture.java?rev=1851618&r1=1851617&r2=1851618&view=diff
==============================================================================
--- felix/trunk/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/executor/HealthCheckFuture.java (original)
+++ felix/trunk/healthcheck/core/src/main/java/org/apache/felix/hc/core/impl/executor/HealthCheckFuture.java Fri Jan 18 13:18:19 2019
@@ -71,12 +71,12 @@ public class HealthCheckFuture extends F
                             resultFromHealthCheck = executeLegacyHc(healthCheck);
                         }
                     } else {
-                        throw new IllegalStateException("Service for " + metadata + " is gone");
+                        throw new IllegalStateException("Service cannot be retrieved via - activate() probably failed");
                     }
 
                 } catch (final Exception e) {
-                    resultFromHealthCheck = new Result(Result.Status.CRITICAL,
-                            "Exception during execution of '" + metadata.getName() + "': " + e, e);
+                    resultFromHealthCheck = new Result(Result.Status.HEALTH_CHECK_ERROR,
+                            "Exception during execution of '" + metadata.getName() + "'", e);
                 } finally {
                     // unget service ref
                     bundleContext.ungetService(metadata.getServiceReference());