camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/6] git commit: CAMEL-7768: Handle fault - Should convert the payload to String using type converter
Date Sat, 30 Aug 2014 13:06:54 GMT
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 <davsclaus@apache.org>
Authored: Sat Aug 30 09:58:46 2014 +0200
Committer: Claus Ibsen <davsclaus@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));
                 }
             }
         }


Mime
View raw message