Hi If you have a copy of Camel in Action, then see page 150.
If you want to do in XML then you can possible do <onWhen><simple>${exception.message} contains 'connect to'</simple><onWhen> But you can also use a java bean public static boolean isConnectError(GenericFileOperationFailedException cause) { ... } <bean id="myBean" class="com.foo.MyErrorBean"/> <onWhen><method ref="myBean" method="isConnectError"/></onWhen> On Mon, May 6, 2013 at 8:00 AM, sarfaraj <sarfarajsay...@gmail.com> wrote: > Thanks clause. Have follow up question. > > Currently I see two below exceptions in FTP > > org.apache.camel.component.file.GenericFileOperationFailedException: Cannot > connect to <XXX file system location> OR > org.apache.camel.component.file.GenericFileOperationFailedException: Cannot > store file: <XXX file system location> > > > But I am not sure about which predicate to use in <onWhen> which will make > sure that to retry when FTP exception occurred. I tried few things also > googled but no luck. > > /Sarfaraj > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Exception-handling-for-camel-ftp-tp5732051p5732056.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen