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 2013/05/30 14:36:27 UTC
[2/2] git commit: Fixed SendProcessor to set exception on exchange in
async process method if not started
Fixed SendProcessor to set exception on exchange in async process method if not started
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c5530acb
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c5530acb
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c5530acb
Branch: refs/heads/master
Commit: c5530acb5bd04f7f1bc9428c99222fb8b5f62cae
Parents: fea576f
Author: Claus Ibsen <da...@apache.org>
Authored: Thu May 30 13:50:35 2013 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Thu May 30 14:36:18 2013 +0200
----------------------------------------------------------------------
.../org/apache/camel/processor/SendProcessor.java | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/c5530acb/camel-core/src/main/java/org/apache/camel/processor/SendProcessor.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/SendProcessor.java b/camel-core/src/main/java/org/apache/camel/processor/SendProcessor.java
index eb8e97c..56f1f6e 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/SendProcessor.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/SendProcessor.java
@@ -105,7 +105,9 @@ public class SendProcessor extends ServiceSupport implements AsyncProcessor, Tra
public boolean process(Exchange exchange, final AsyncCallback callback) {
if (!isStarted()) {
- throw new IllegalStateException("SendProcessor has not been started: " + this);
+ exchange.setException(new IllegalStateException("SendProcessor has not been started: " + this));
+ callback.done(true);
+ return true;
}
// we should preserve existing MEP so remember old MEP