Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 2432 invoked from network); 29 Jun 2010 09:55:47 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Jun 2010 09:55:47 -0000 Received: (qmail 61917 invoked by uid 500); 29 Jun 2010 09:55:46 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 61633 invoked by uid 500); 29 Jun 2010 09:55:44 -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 61625 invoked by uid 99); 29 Jun 2010 09:55:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jun 2010 09:55:43 +0000 X-ASF-Spam-Status: No, hits=3.0 required=10.0 tests=FORGED_YAHOO_RCVD,FREEMAIL_FROM,SPF_HELO_PASS,SPF_NEUTRAL,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jun 2010 09:55:36 +0000 Received: from sam.nabble.com ([192.168.236.26]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1OTXX9-0000GH-Si for users@camel.apache.org; Tue, 29 Jun 2010 02:55:15 -0700 Date: Tue, 29 Jun 2010 02:55:15 -0700 (PDT) From: Nav To: users@camel.apache.org Message-ID: <1277805315878-511830.post@n5.nabble.com> Subject: Error Handling problem while trying to get stack trace MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org HI, We have a requirement that, on error in any of our routes, the error stack trace should be emailed to the developers. I am using Camel 2.3.0. I am not able to get the stack trace in the processor. Please let me know what is the best way to do this . I have the following common error handling route. true In the processor 'errorHandler', I am doing the following: public class ErrorHandler implements Processor { public void process(Exchange exchange) throws Exception { Exception c = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Exception.class); exchange.getIn().setBody(c.getStackTrace()); } } The result I get instead of the stack trace is : [Ljava.lang.StackTraceElement;@4051b1fb which is the object representation of the stacktrace element. -- View this message in context: http://camel.465427.n5.nabble.com/Error-Handling-problem-while-trying-to-get-stack-trace-tp511830p511830.html Sent from the Camel - Users mailing list archive at Nabble.com.