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 2017/05/27 08:01:21 UTC
camel git commit: Polished
Repository: camel
Updated Branches:
refs/heads/master 7a98001b7 -> 690c92c85
Polished
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/690c92c8
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/690c92c8
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/690c92c8
Branch: refs/heads/master
Commit: 690c92c85b12fe34749d112e7f2b675ffaa7a3ac
Parents: 7a98001
Author: Claus Ibsen <da...@apache.org>
Authored: Sat May 27 10:00:38 2017 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat May 27 10:00:38 2017 +0200
----------------------------------------------------------------------
.../camel/processor/interceptor/Debug.java | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/690c92c8/camel-core/src/main/java/org/apache/camel/processor/interceptor/Debug.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/interceptor/Debug.java b/camel-core/src/main/java/org/apache/camel/processor/interceptor/Debug.java
index 18c42e7..e62a79e 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/interceptor/Debug.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/interceptor/Debug.java
@@ -44,16 +44,25 @@ public class Debug implements InterceptStrategy {
return new DelegateAsyncProcessor(target) {
@Override
public boolean process(final Exchange exchange, final AsyncCallback callback) {
- debugger.beforeProcess(exchange, target, definition);
+ try {
+ debugger.beforeProcess(exchange, target, definition);
+ } catch (Throwable e) {
+ exchange.setException(e);
+ callback.done(true);
+ return true;
+ }
+
final StopWatch watch = new StopWatch();
return processor.process(exchange, new AsyncCallback() {
public void done(boolean doneSync) {
long diff = watch.stop();
- debugger.afterProcess(exchange, processor, definition, diff);
-
- // must notify original callback
- callback.done(doneSync);
+ try {
+ debugger.afterProcess(exchange, processor, definition, diff);
+ } finally {
+ // must notify original callback
+ callback.done(doneSync);
+ }
}
});
}