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/ff92795e Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ff92795e Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ff92795e Branch: refs/heads/camel-2.17.x Commit: ff92795ef755e755ef70e2165b80d4b6455d8ea4 Parents: e9d9526 Author: Michael Frankfurter <mic...@micfra.net> Authored: Sun Aug 21 11:50:57 2016 +0200 Committer: Claus Ibsen <davscl...@apache.org> Committed: Sun Aug 21 12:44:57 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/ff92795e/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 +}