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 2014/08/30 15:06:54 UTC
[2/6] git commit: CAMEL-7768: Handle fault - Should convert the
payload to String using type converter
CAMEL-7768: Handle fault - Should convert the payload to String using type converter
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c521f5c8
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c521f5c8
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c521f5c8
Branch: refs/heads/camel-2.13.x
Commit: c521f5c8ee7df960b1c5a3e9a9fb1c7d8c612f25
Parents: 6f1d422
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Aug 30 09:58:46 2014 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Aug 30 15:05:14 2014 +0200
----------------------------------------------------------------------
.../camel/processor/interceptor/HandleFaultInterceptor.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/c521f5c8/camel-core/src/main/java/org/apache/camel/processor/interceptor/HandleFaultInterceptor.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/interceptor/HandleFaultInterceptor.java b/camel-core/src/main/java/org/apache/camel/processor/interceptor/HandleFaultInterceptor.java
index cc6bbe5..538fe88 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/interceptor/HandleFaultInterceptor.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/interceptor/HandleFaultInterceptor.java
@@ -65,7 +65,8 @@ public class HandleFaultInterceptor extends DelegateAsyncProcessor {
exchange.setException((Throwable) faultBody);
} else {
// wrap it in an exception
- exchange.setException(new CamelException(faultBody.toString()));
+ String data = exchange.getContext().getTypeConverter().convertTo(String.class, exchange, faultBody);
+ exchange.setException(new CamelException(data));
}
}
}