Return-Path: X-Original-To: apmail-camel-dev-archive@www.apache.org Delivered-To: apmail-camel-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 538A3943F for ; Tue, 25 Oct 2011 16:02:54 +0000 (UTC) Received: (qmail 28700 invoked by uid 500); 25 Oct 2011 16:02:53 -0000 Delivered-To: apmail-camel-dev-archive@camel.apache.org Received: (qmail 28655 invoked by uid 500); 25 Oct 2011 16:02:53 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 28435 invoked by uid 99); 25 Oct 2011 16:02:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Oct 2011 16:02:53 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Oct 2011 16:02:52 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 4C35731BF06 for ; Tue, 25 Oct 2011 16:00:33 +0000 (UTC) Date: Tue, 25 Oct 2011 16:00:33 +0000 (UTC) From: "Claus Ibsen (Commented) (JIRA)" To: dev@camel.apache.org Message-ID: <1128121125.13892.1319558433313.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1786361971.8120.1319451092042.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CAMEL-4576) Make exception throwing as flexible in XML as in Java DSL MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-4576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13135178#comment-13135178 ] Claus Ibsen commented on CAMEL-4576: ------------------------------------ You wanna create a new exception instance on the fly and provide a String for its constructor. And that String parameter is constructed using the Simple language. Which use-case do you need this for? Eg to use in a Camel route? > Make exception throwing as flexible in XML as in Java DSL > --------------------------------------------------------- > > Key: CAMEL-4576 > URL: https://issues.apache.org/jira/browse/CAMEL-4576 > Project: Camel > Issue Type: Improvement > Components: camel-core > Affects Versions: 2.8.1 > Environment: N/A > Reporter: David J. M. Karlsen > Labels: exception, throwException, xml > > When throwing exceptions there are more options in the java DSL (one has full control) than in the XML where you can only reference an exception instance. > It would be useful to be able to construct the exception and throw it, so that one could add messages to it - preferably like: > {noformat} > throwException class="someEx" message="someProblem ${body} ${in.header.someHeader} > {noformat} > Reference: http://camel.apache.org/exception-clause.html -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira