camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (CAMEL-1120) Getting exception message using builder
Date Wed, 26 Nov 2008 19:47:05 GMT

     [ https://issues.apache.org/activemq/browse/CAMEL-1120?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Claus Ibsen resolved CAMEL-1120.
--------------------------------

    Resolution: Fixed

Fixed in 2.0 and updated wiki at exception clause and simple language.

> Getting exception message using builder
> ---------------------------------------
>
>                 Key: CAMEL-1120
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1120
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.0.0
>
>
> The exception clause below
> {code}
>                 onException(MyFunctionalException.class)
>                         .handled(true)
>                         .transform(constant("Sorry"));
> {code}
> Instead of returning the constant Sorry we want to return the exception message, instead
of using a processor, bean etc. we want some value builder in BuilderSupport so you can do
it as:
> {code}
>                 onException(MyFunctionalException.class)
>                         .handled(true)
>                         .transform(exceptionMessage());
> {code}
> And also add variables to the exception message in the simple language so you can do
something like this:
> {code}
>                 onException(MyFunctionalException.class)
>                         .handled(true)
>                         .transform().simple("Error reported ${exception.message} - can
not process this message.");
> {code}
> Then the caller will receive the response we have created there instead of the MyFunctionalException

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message