You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by yeandone <wi...@gmail.com> on 2015/01/09 08:20:52 UTC
How to delete a file if any exception happens
Hi, All.
I have a question on how to delete a file if any exception happens:
<route id="eroute">
<from uri="sftp://abc.com/pickup&preMove=process />
<marshal ref="myJaxb" />
<to uri="sftp://abc.com/done" />
<onException>
//I want to delete the file and move on
</onException>
</route>
I will appreciate any code samples and ideas.
Thanks
--
View this message in context: http://camel.465427.n5.nabble.com/How-to-delete-a-file-if-any-exception-happens-tp5761492.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: How to delete a file if any exception happens
Posted by Claus Ibsen <cl...@gmail.com>.
See about handled / continued
http://camel.apache.org/exception-clause.html
On Fri, Jan 9, 2015 at 8:20 AM, yeandone <wi...@gmail.com> wrote:
> Hi, All.
>
> I have a question on how to delete a file if any exception happens:
>
> <route id="eroute">
> <from uri="sftp://abc.com/pickup&preMove=process />
> <marshal ref="myJaxb" />
> <to uri="sftp://abc.com/done" />
> <onException>
> //I want to delete the file and move on
> </onException>
> </route>
>
> I will appreciate any code samples and ideas.
>
> Thanks
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-delete-a-file-if-any-exception-happens-tp5761492.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/