Hi See this FAQ. http://camel.apache.org/why-do-my-file-consumer-not-pickup-the-file-and-how-do-i-let-the-file-consumer-use-the-camel-error-handler.html
On Fri, May 25, 2012 at 1:41 PM, Nafees <[email protected]> wrote: > 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. -- Claus Ibsen ----------------- CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com FuseSource Email: [email protected] Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
