camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stefzar <>
Subject Re: Changing from file-consumer to ftp-consumer
Date Wed, 27 Jun 2012 12:14:41 GMT
I have tried it with exception handling now.

My route looks like this:

context.addRoutes(new RouteBuilder() {
	public void configure() {



The onException-clause works fine if the folder "Notification" does exist
(meaning the "Exception caught" string will be logged), but if it does not
then there is also a GenericFileOperationFailedException but it won't be
catched by the onException-clause.

How can I catch the Exception if the folder does not exist? The difference
is that in case of the existing folder the consumer sends an empty message
and the exception occurs at the .to-clause and in case of the non existing
folder the consumer throws the Exception. I guess the problem is that the
exception won't pass the default error handler if it's thrown by the

Or in other words: How can I catch Exceptions thrown by a consumer?

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message