camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jans...@apache.org
Subject svn commit: r721306 - /activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/HandleFaultProcessor.java
Date Thu, 27 Nov 2008 22:24:10 GMT
Author: janstey
Date: Thu Nov 27 14:24:10 2008
New Revision: 721306

URL: http://svn.apache.org/viewvc?rev=721306&view=rev
Log:
Only convert fault message to exception if an exception has not been set already. This change
is related to SM-1686.

Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/HandleFaultProcessor.java

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/HandleFaultProcessor.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/HandleFaultProcessor.java?rev=721306&r1=721305&r2=721306&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/HandleFaultProcessor.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/HandleFaultProcessor.java
Thu Nov 27 14:24:10 2008
@@ -55,8 +55,10 @@
                             if (faultBody instanceof Throwable) {
                                 exchange.setException((Throwable)faultBody);
                             } else {
-                                exchange.setException(new CamelException("Message contains
fault of type "
-                                    + faultBody.getClass().getName() + ":\n" + faultBody));
+                                if (exchange.getException() == null) {                  
             
+                                    exchange.setException(new CamelException("Message contains
fault of type "
+                                        + faultBody.getClass().getName() + ":\n" + faultBody));
+                                }
                             }
                         }
                     }
@@ -79,8 +81,10 @@
                 if (faultBody instanceof Throwable) {
                     exchange.setException((Throwable)faultBody);
                 } else {
-                    exchange.setException(new CamelException("Message contains fault of type
"
-                        + faultBody.getClass().getName() + ":\n" + faultBody));
+                    if (exchange.getException() == null) {
+                        exchange.setException(new CamelException("Message contains fault
of type "
+                            + faultBody.getClass().getName() + ":\n" + faultBody));
+                    }
                 }
             }
         }



Mime
View raw message