You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Bengt Rodehav (JIRA)" <ji...@apache.org> on 2010/11/29 08:47:38 UTC
[jira] Commented: (CAMEL-3372) file component - onMoveFailed -
should keep the exchange marked as failed, so onCompletion etc can react on
failures
[ https://issues.apache.org/jira/browse/CAMEL-3372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12964644#action_12964644 ]
Bengt Rodehav commented on CAMEL-3372:
--------------------------------------
I had a hunch that there was a reason for setting the exchange as handled - now we know.
Will the property Exchange.EXCHANGE_CAUGHT always have a value if the exchange has failed? In other words, will the following code always work?
\\
\\
{code}
Exception cause = theExchange.getProperty(Exchange.EXCEPTION_CAUGHT, Exception.class);
boolean failed = theExchange.isFailed() || (cause != null);
{code}
\\
My current workaround is to set a custom property in my onException handler. I then check that property in onCompletion to see if the exchange has previously failed. Can I use the EXCEPTION_ CAUGHT property instead?
> file component - onMoveFailed - should keep the exchange marked as failed, so onCompletion etc can react on failures
> --------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-3372
> URL: https://issues.apache.org/jira/browse/CAMEL-3372
> Project: Apache Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.5.0
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.6.0
>
>
> See nabble
> http://camel.465427.n5.nabble.com/onCompletion-for-failed-exchanges-tp3281388p3281388.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.