Hi,
You my want to try to put your onException to route scope and don't forget to 
add an end() to your onException sub

from()
.onException()....stop().end()
.to()
.to();

Regards,
Ngoc Hai



--- On Thu, 9/22/11, livensn <[email protected]> wrote:

> From: livensn <[email protected]>
> Subject: Camel onException()
> To: [email protected]
> Date: Thursday, September 22, 2011, 6:44 PM
> Hi all,
> 
> In our project, we need to validate a csv file, we do this
> in a camel route.
> 
> But if something is wrong with the csv, we throw an
> exception.
> Is it possible to stop the route right after this exception
> is thrown?
> 
> We've tried onException(RuntimeException.class).stop()
> We've tried
> onException(RuntimeException.class).maxmimumRedeliveries(0)
> 
> Any help is appreciated.
> 
> Thanks
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-onException-tp4829847p4829847.html
> Sent from the Camel - Users mailing list archive at
> Nabble.com.
> 

Reply via email to