camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bo...@apache.org
Subject svn commit: r1134404 - in /camel/trunk/camel-core/src: main/java/org/apache/camel/processor/RedeliveryErrorHandler.java test/java/org/apache/camel/processor/onexception/OnExceptionContinueTest.java
Date Fri, 10 Jun 2011 18:20:39 GMT
Author: boday
Date: Fri Jun 10 18:20:39 2011
New Revision: 1134404

URL: http://svn.apache.org/viewvc?rev=1134404&view=rev
Log:
CAMEL-4057: fixed issue with multiple Exceptions thrown in a route when using .continued(true)
exception handling

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RedeliveryErrorHandler.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueTest.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RedeliveryErrorHandler.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RedeliveryErrorHandler.java?rev=1134404&r1=1134403&r2=1134404&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RedeliveryErrorHandler.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/processor/RedeliveryErrorHandler.java
Fri Jun 10 18:20:39 2011
@@ -506,6 +506,7 @@ public abstract class RedeliveryErrorHan
         exchange.getIn().removeHeader(Exchange.REDELIVERED);
         exchange.getIn().removeHeader(Exchange.REDELIVERY_COUNTER);
         exchange.getIn().removeHeader(Exchange.REDELIVERY_MAX_COUNTER);
+        exchange.removeProperty(Exchange.FAILURE_HANDLED);
         // keep the Exchange.EXCEPTION_CAUGHT as property so end user knows the caused exception
 
         // create log message

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueTest.java?rev=1134404&r1=1134403&r2=1134404&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionContinueTest.java
Fri Jun 10 18:20:39 2011
@@ -51,6 +51,8 @@ public class OnExceptionContinueTest ext
                 from("direct:start")
                     .to("mock:start")
                     .throwException(new IllegalArgumentException("Forced"))
+                    //throw a second time to validate that the exchange is reset appropriately
+                    .throwException(new IllegalArgumentException("Forced"))
                     .to("mock:result");
             }
             // END SNIPPET: e1



Mime
View raw message