camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1137350 - /camel/trunk/camel-core/src/main/java/org/apache/camel/processor/TryProcessor.java
Date Sun, 19 Jun 2011 11:46:43 GMT
Author: davsclaus
Date: Sun Jun 19 11:46:43 2011
New Revision: 1137350

URL: http://svn.apache.org/viewvc?rev=1137350&view=rev
Log:
CAMEL-4103: Fixed so doFinally also have caught exception information

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

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/TryProcessor.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/TryProcessor.java?rev=1137350&r1=1137349&r2=1137350&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/processor/TryProcessor.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/processor/TryProcessor.java Sun
Jun 19 11:46:43 2011
@@ -280,6 +280,10 @@ public class TryProcessor extends Servic
             // clear exception so finally block can be executed
             final Exception e = exchange.getException();
             exchange.setException(null);
+            // but store the caught exception as a property
+            if (e != null) {
+                exchange.setProperty(Exchange.EXCEPTION_CAUGHT, e);
+            }
             // store the last to endpoint as the failure endpoint
             exchange.setProperty(Exchange.FAILURE_ENDPOINT, exchange.getProperty(Exchange.TO_ENDPOINT));
 



Mime
View raw message