Hi

errorHandlerRef gets invoked when the routing of a given exchange fails,
however the ExceptionHandler on GenericFileOnCompletion handles exceptions
encountered *specific* to the file component and it's derivatives.

The default ExceptionHandler Impl is LoggingExceptionHandler which on it's
turn *only* logs the exception & continues, that's it! If you want to react
differently on an encountered exception you can inject your own custom
ExceptionHandler (for example into a FileConsumer). The other option is to
provide your own Synchronization [1] implementation and do:

exchange.addOnCompletion(MyHandler)

For example from inside a Processor inside your route.

BTW just in case of your interest there's another thread [2] about this I
started while ago however without any answer :-)

[1]
https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/main/java/org/apache/camel/spi/Synchronization.java
[2]
http://camel.465427.n5.nabble.com/Does-the-FileConsumer-swallow-an-exception-by-just-only-logging-it-td5054954.html

Babak  

--
View this message in context: 
http://camel.465427.n5.nabble.com/ExceptionHandler-in-a-ftp-Route-tp5451466p5451941.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to