You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by sv...@apache.org on 2016/10/31 11:32:12 UTC

[1/2] brooklyn-server git commit: Enabled logging for specific exceptions

Repository: brooklyn-server
Updated Branches:
  refs/heads/master 9e4c225e8 -> d7edfadaa


Enabled logging for specific exceptions


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/2cf4b2bc
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/2cf4b2bc
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/2cf4b2bc

Branch: refs/heads/master
Commit: 2cf4b2bc2bb6f004eafe844e18d1bc1498d80e69
Parents: 44d11e2
Author: Duncan Godwin <du...@cloudsoftcorp.com>
Authored: Thu Oct 20 14:22:06 2016 +0100
Committer: Duncan Godwin <du...@cloudsoftcorp.com>
Committed: Thu Oct 20 14:22:06 2016 +0100

----------------------------------------------------------------------
 .../apache/brooklyn/util/core/task/BasicExecutionManager.java  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/2cf4b2bc/core/src/main/java/org/apache/brooklyn/util/core/task/BasicExecutionManager.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/util/core/task/BasicExecutionManager.java b/core/src/main/java/org/apache/brooklyn/util/core/task/BasicExecutionManager.java
index 1bf5eca..3c0e321 100644
--- a/core/src/main/java/org/apache/brooklyn/util/core/task/BasicExecutionManager.java
+++ b/core/src/main/java/org/apache/brooklyn/util/core/task/BasicExecutionManager.java
@@ -536,7 +536,11 @@ public class BasicExecutionManager implements ExecutionManager {
                         // debug only here, because most submitters will handle failures
                         if (error instanceof InterruptedException || error instanceof RuntimeInterruptedException) {
                             log.debug("Detected interruption on task "+task+" (rethrowing)" +
-                                (Strings.isNonBlank(error.getMessage()) ? ": "+error.getMessage() : ""));
+                                    (Strings.isNonBlank(error.getMessage()) ? ": "+error.getMessage() : ""));
+                        } else if (error instanceof NullPointerException ||
+                                error instanceof IndexOutOfBoundsException ||
+                                error instanceof ClassCastException) {
+                            log.debug("Exception running task "+task+" (rethrowing): "+error, error);
                         } else {
                             log.debug("Exception running task "+task+" (rethrowing): "+error);
                         }


[2/2] brooklyn-server git commit: Closes #391

Posted by sv...@apache.org.
Closes #391

Enable BasicExecutionManager logging for specific exceptions

A NullPointerException in ServiceReplacer was being swallowed in BasicExecutionManager, this makes exemptions for logging specific types of Exceptions.


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/d7edfada
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/d7edfada
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/d7edfada

Branch: refs/heads/master
Commit: d7edfadaaca760747199f27adf448316c80cd18a
Parents: 9e4c225 2cf4b2b
Author: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Authored: Mon Oct 31 13:32:03 2016 +0200
Committer: Svetoslav Neykov <sv...@cloudsoftcorp.com>
Committed: Mon Oct 31 13:32:03 2016 +0200

----------------------------------------------------------------------
 .../apache/brooklyn/util/core/task/BasicExecutionManager.java  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------