Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 28428 invoked from network); 28 Sep 2010 15:35:40 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 28 Sep 2010 15:35:40 -0000 Received: (qmail 96274 invoked by uid 500); 28 Sep 2010 15:35:40 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 96083 invoked by uid 500); 28 Sep 2010 15:35:39 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 96070 invoked by uid 99); 28 Sep 2010 15:35:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Sep 2010 15:35:38 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of claus.ibsen@gmail.com designates 209.85.216.173 as permitted sender) Received: from [209.85.216.173] (HELO mail-qy0-f173.google.com) (209.85.216.173) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Sep 2010 15:35:32 +0000 Received: by qyk9 with SMTP id 9so6867200qyk.11 for ; Tue, 28 Sep 2010 08:35:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=8A5TkjV3O8omkn/vxBIlQlfplXPDkg6bshbfl4X/8aQ=; b=bB8ghFNcebORn7u153YEa3I1u6WkWdWXzmbRYWuwPOf2cIs4kduxjkHw2JnHby2Tau OQikNTexknHgZZ+6wiJ3i474En7BPw7b/DsM1h0SmEd2DYgl0TexBHHlwt6QLfMXEJlx SgqJTf/8epUPw+iAatEEri1FDsQLNuhDCduTo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=QbSg56FZkz/s9SfAgMFy8WYB5FMMy/m4mgt5QQjlmnuDkKWkCvmOTbUEl0LSwi2P/o waq7QFB28lRuV0xz6f9/o0Ed6EhQLNah8Mj5yCga5M/QxB+7AvTjZ/Cwdb9OspC5ElTh DSi6+bTa9ULSkzkascJj2ddfJhiZ3mMOnBCIU= Received: by 10.229.224.149 with SMTP id io21mr59108qcb.160.1285688111400; Tue, 28 Sep 2010 08:35:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.11.22 with HTTP; Tue, 28 Sep 2010 08:34:51 -0700 (PDT) In-Reply-To: References: From: Claus Ibsen Date: Tue, 28 Sep 2010 17:34:51 +0200 Message-ID: Subject: Re: Exception details To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Tue, Sep 28, 2010 at 5:27 PM, wrote: > You realise I am going to have to get my 50 c of help now :-) > > Is it possible to use a route as an error handler? =A0I would like to be = able to log an exception, raise an SMS and push the message onto a queue fo= r later reprocessing. =A0We are trying to keep all of our config in the Spr= ing XML. =A0(Config file releases are much simpler admin-wise than code rel= eases). > Yeah use the DeadLetterChannel and set the endpoint to a direct:myRoute And then define a route with from("direct:myRoute") and its just like any other route. > > Steven Hedges > IT - Credit Booking Derivs > > -----Original Message----- > From: Claus Ibsen [mailto:claus.ibsen@gmail.com] > Sent: 28 September 2010 16:13 > To: users@camel.apache.org > Subject: Re: Exception details > > On Tue, Sep 28, 2010 at 3:46 PM, =A0 wr= ote: >> I've bought the book! >> > > Ah great. Then Jonathan and I earned 50 cent today. > > I hope the book will help and inspire you with your current endeavor with= Camel. Good luck. > >> >> >> Steven Hedges >> IT - Credit Booking Derivs >> >> 10 The South Colonnade >> Canary Wharf, >> London E14 4PU, >> United Kingdom >> >> 02031344655 >> x44655 >> >> -----Original Message----- >> From: Claus Ibsen [mailto:claus.ibsen@gmail.com] >> Sent: 28 September 2010 14:33 >> To: users@camel.apache.org >> Subject: Re: Exception details >> >> On Tue, Sep 28, 2010 at 3:26 PM, =A0 w= rote: >>> I'll get the book... >>> >>> From the info on that page, is it correct to assume that it is impossib= le to get at the exception info from the Spring XML config? =A0All I want t= o do is to log the actual exception to a file. >>> >> >> The simple language can access the caused exception using $exception >> See simple http://camel.apache.org/simple >> >> Something like this: >> >> onException(Exception.class).handled(true).transform(simple("Damn the >> problem is $exception.message and >> stacktrace\n$exception")).to("file:errors"); >> >> But reading the entire chapter 5 about error handling will help you unde= rstand some of the many features it provides. >> The wiki pages is a bit of a mess here and there for error handling as i= ts a hard topic to document well. >> >> >>> >>> >>> Steven Hedges >>> IT - Credit Booking Derivs >>> >>> >>> >>> -----Original Message----- >>> From: Claus Ibsen [mailto:claus.ibsen@gmail.com] >>> Sent: 28 September 2010 14:09 >>> To: users@camel.apache.org >>> Subject: Re: Exception details >>> >>> On Tue, Sep 28, 2010 at 2:49 PM, =A0 = wrote: >>>> Hi >>>> >>>> This is probably very straightforward, but I've scoured the docs and c= an't find an answer. >>>> >>>> Is it possible to get details of the actual exception that occurred >>>> in an error handler? =A0So far, I can see how to access the message >>>> that caused an error (using the $body variable) but not the >>>> exception itself >>>> >>> >>> Yeah if you got the Camel in Action book, see section 5.4.4 >>> >>> And you can find also some details about it here >>> http://camel.apache.org/exception-clause.html >>> >>> see section _Using a processor as failure handler_ >>> >>>> Thanks in advance >>>> >>>> >>>> Steven Hedges >>>> IT - Credit Booking Derivs >>>> >>>> 10 The South Colonnade >>>> Canary Wharf, >>>> London E14 4PU, >>>> United Kingdom >>>> >>>> 02031344655 >>>> x44655 >>>> >>>> >>>> _______________________________________________ >>>> >>>> This e-mail may contain information that is confidential, privileged o= r otherwise protected from disclosure. If you are not an intended recipient= of this e-mail, do not duplicate or redistribute it by any means. Please d= elete it and any attachments and notify the sender that you have received i= t in error. Unless specifically indicated, this e-mail is not an offer to b= uy or sell or a solicitation to buy or sell any securities, investment prod= ucts or other financial product or service, an official confirmation of any= transaction, or an official statement of Barclays. Any views or opinions p= resented are solely those of the author and do not necessarily represent th= ose of Barclays. This e-mail is subject to terms available at the following= link: www.barcap.com/emaildisclaimer. By messaging with Barclays you conse= nt to the foregoing. =A0Barclays Capital is the investment banking division= of Barclays Bank PLC, a company registered in England (number 1026167) wit= h its registered office at 1 Churchill Place, London, E14 5HP. =A0This emai= l may relate to or be sent from other members of the Barclays Group. >>>> _______________________________________________ >>>> >>> >>> >>> >>> -- >>> Claus Ibsen >>> Apache Camel Committer >>> >>> Author of Camel in Action: http://www.manning.com/ibsen/ Open Source >>> Integration: http://fusesource.com >>> Blog: http://davsclaus.blogspot.com/ >>> Twitter: http://twitter.com/davsclaus >>> >> >> >> >> -- >> Claus Ibsen >> Apache Camel Committer >> >> Author of Camel in Action: http://www.manning.com/ibsen/ Open Source >> Integration: http://fusesource.com >> Blog: http://davsclaus.blogspot.com/ >> Twitter: http://twitter.com/davsclaus >> > > > > -- > Claus Ibsen > Apache Camel Committer > > Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Inte= gration: http://fusesource.com > Blog: http://davsclaus.blogspot.com/ > Twitter: http://twitter.com/davsclaus > --=20 Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus