[
https://issues.apache.org/activemq/browse/CAMEL-1929?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-1929:
-------------------------------
Description:
When using
{code}
onException(Exception.class).handled(true).process(new MyErrorHandler());
// or use
doTry()
...
doCatch(Exception.class).handled(true).process(new MyErrorHandler());
{code}
We should make it consistent that there is a flag and that you can obtain the
caused exception.
So these properties on the Exchange should be the during the failure processor
routing and what is returned to the client
- Exchange.EXCEPTION_CAUGHT contains the caused exception
- Exchange.FAILURE_HANDLED a boolean whether it was handled or not
was:
When using
{code}
onException(Exception.class).handled(true).process(new MyErrorHandler());
{code}
The MyErrorHandler cannot see the original caused exception as you have marked
it as handled.
We should expose that exception as a property
Either let it stay on
- {{Exchange.EXCEPTION_CAUGHT}}
Or introduce a new property
- {{Exchange.EXCEPTION_HANDLED}}
The former has the benefit its the same property all the time which may be the
best solution. However it will stay on the Exchange for the remainder of the
routing, unless end user removes it manually.
Issue Type: Improvement (was: New Feature)
Summary: ErrorHandler - handling exception using handled=true should
expose a flag its handled (was: ErrorHandler - handling exception using
handled=true should expose the handled exception on exchange property)
> ErrorHandler - handling exception using handled=true should expose a flag its
> handled
> -------------------------------------------------------------------------------------
>
> Key: CAMEL-1929
> URL: https://issues.apache.org/activemq/browse/CAMEL-1929
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 1.6.1, 2.0-M3
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Fix For: 2.1.0
>
>
> When using
> {code}
> onException(Exception.class).handled(true).process(new MyErrorHandler());
> // or use
> doTry()
> ...
> doCatch(Exception.class).handled(true).process(new MyErrorHandler());
> {code}
> We should make it consistent that there is a flag and that you can obtain the
> caused exception.
> So these properties on the Exchange should be the during the failure
> processor routing and what is returned to the client
> - Exchange.EXCEPTION_CAUGHT contains the caused exception
> - Exchange.FAILURE_HANDLED a boolean whether it was handled or not
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.