You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/08/21 10:45:24 UTC

[4/4] camel git commit: Fix CAMEL-10253: Add check on null

Fix CAMEL-10253: Add check on null


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/797bbbce
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/797bbbce
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/797bbbce

Branch: refs/heads/camel-2.16.x
Commit: 797bbbce5f20c3bbffec4d6162778cab27509637
Parents: 811ef5f
Author: Michael Frankfurter <mi...@micfra.net>
Authored: Sun Aug 21 11:50:57 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sun Aug 21 12:45:12 2016 +0200

----------------------------------------------------------------------
 .../org/apache/camel/processor/ThrowExceptionProcessor.java     | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/797bbbce/camel-core/src/main/java/org/apache/camel/processor/ThrowExceptionProcessor.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/ThrowExceptionProcessor.java b/camel-core/src/main/java/org/apache/camel/processor/ThrowExceptionProcessor.java
index 931e064..08f1dc1 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/ThrowExceptionProcessor.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/ThrowExceptionProcessor.java
@@ -80,7 +80,8 @@ public class ThrowExceptionProcessor extends ServiceSupport implements AsyncProc
     }
 
     public String getTraceLabel() {
-        return "throwException[" + exception.getClass().getSimpleName() + "]";
+        String className = this.exception == null ? this.type.getSimpleName() : this.exception.getClass().getSimpleName();
+        return "throwException[" + className + "]";
     }
 
     public String getId() {
@@ -128,4 +129,4 @@ public class ThrowExceptionProcessor extends ServiceSupport implements AsyncProc
     protected void doStop() throws Exception {
         // noop
     }
-}
\ No newline at end of file
+}