[
https://issues.apache.org/jira/browse/CAMEL-18169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-18169.
---------------------------------
Resolution: Won't Fix
> setException as for Camel DSL
> -----------------------------
>
> Key: CAMEL-18169
> URL: https://issues.apache.org/jira/browse/CAMEL-18169
> Project: Camel
> Issue Type: New Feature
> Components: came-core
> Reporter: Michael Rambichler
> Priority: Trivial
>
> For convinience I would like to have camel dsl extended with following method:
> *.setException(..)*
>
> Then the following example would be one liner.
>
> *Example:*
> .doTry()
> // try something
> .endDoTry()
> doCatch(Exception.class)
> // Set the exception after our compensation logic is performed in order
> for the route error handler to kick in.
> .process(exchange -> {
> Exception exception =
> exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Exception.class);
> if (exception != null) {
> exchange.setException(exception);
> }
> })
> .end();
>
--
This message was sent by Atlassian Jira
(v8.20.7#820007)