Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3384FCF0D for ; Fri, 25 May 2012 12:12:39 +0000 (UTC) Received: (qmail 24771 invoked by uid 500); 25 May 2012 12:12:38 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 24559 invoked by uid 500); 25 May 2012 12:12:36 -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 Delivered-To: moderator for users@camel.apache.org Received: (qmail 50311 invoked by uid 99); 25 May 2012 11:41:30 -0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 216.139.236.26 is neither permitted nor denied by domain of s.nafeesunnisa@gmail.com) Date: Fri, 25 May 2012 04:41:03 -0700 (PDT) From: Nafees To: users@camel.apache.org Message-ID: <1337946063815-5713541.post@n5.nabble.com> Subject: Handling exception when routes are processed 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.. I am using the following route to consume files from FTP server and store in a local folder. When the directory name is not correct, it raises this exception - org.apache.camel.component.file.GenericFileOperationFailedException: File operation failed: 550. I want to handle them. from(ftpUrl).routeId("FTP_ROUTE").to(fileUrl).to("bean:localRouteHelper?method=stopFtpRoute") I am associating the onException() as from(ftpUrl).routeId("FTP_ROUTE").to(fileUrl).to("bean:localRouteHelper?method=stopFtpRoute") .onException(GenericFileOperationFailedException.class) .handled(true) .to("bean:optimerExceptionHandler?method=activemqException"); I am giving directory name wantedly wrong in order to check these kind of exceptions. Please provide me help in this regard. It just displays the exceptions but not going to bean method. Please let me know how to handle the exceptions raised when routes are executed in general (e.g. from jms, file etc ) Thanks -- View this message in context: http://camel.465427.n5.nabble.com/Handling-exception-when-routes-are-processed-tp5713541.html Sent from the Camel - Users mailing list archive at Nabble.com.