Polished to have a reason why rejected in the exception

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

Branch: refs/heads/master
Commit: b444042ff79a78f9678129a75fba37210e5bff51
Parents: c9c2856
Author: Claus Ibsen <davscl...@apache.org>
Authored: Sat Feb 13 09:13:16 2016 +0100
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Sat Feb 13 09:14:34 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/camel/blob/b444042f/camel-core/src/main/java/org/apache/camel/processor/CamelInternalProcessor.java
----------------------------------------------------------------------
diff --git 
a/camel-core/src/main/java/org/apache/camel/processor/CamelInternalProcessor.java
 
b/camel-core/src/main/java/org/apache/camel/processor/CamelInternalProcessor.java
index 32f8b38..7ce5a4d 100644
--- 
a/camel-core/src/main/java/org/apache/camel/processor/CamelInternalProcessor.java
+++ 
b/camel-core/src/main/java/org/apache/camel/processor/CamelInternalProcessor.java
@@ -271,9 +271,10 @@ public class CamelInternalProcessor extends 
DelegateAsyncProcessor {
         // determine if we can still run, or the camel context is forcing a 
shutdown
         boolean forceShutdown = 
exchange.getContext().getShutdownStrategy().forceShutdown(this);
         if (forceShutdown) {
-            LOG.debug("Run not allowed as ShutdownStrategy is forcing shutting 
down, will reject executing exchange: {}", exchange);
+            String msg = "Run not allowed as ShutdownStrategy is forcing 
shutting down, will reject executing exchange: " + exchange;
+            LOG.debug(msg);
             if (exchange.getException() == null) {
-                exchange.setException(new RejectedExecutionException());
+                exchange.setException(new RejectedExecutionException(msg));
             }
             return false;
         }

Reply via email to