You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2011/06/19 13:46:43 UTC
svn commit: r1137350 -
/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/TryProcessor.java
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));