Author: janstey
Date: Thu Nov 27 14:36:28 2008
New Revision: 721308

URL: http://svn.apache.org/viewvc?rev=721308&view=rev
Log:
Merged revisions 721306 via svnmerge from 
https://svn.apache.org/repos/asf/activemq/camel/trunk

........
  r721306 | janstey | 2008-11-27 18:54:10 -0330 (Thu, 27 Nov 2008) | 1 line
  
  Only convert fault message to exception if an exception has not been set 
already. This change is related to SM-1686.
........

Modified:
    activemq/camel/branches/camel-1.x/   (props changed)
    
activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/HandleFaultProcessor.java

Propchange: activemq/camel/branches/camel-1.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: 
activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/HandleFaultProcessor.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/HandleFaultProcessor.java?rev=721308&r1=721307&r2=721308&view=diff
==============================================================================
--- 
activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/HandleFaultProcessor.java
 (original)
+++ 
activemq/camel/branches/camel-1.x/camel-core/src/main/java/org/apache/camel/processor/HandleFaultProcessor.java
 Thu Nov 27 14:36:28 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));
+                    }
                 }
             }
         }


Reply via email to