You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by ravivadgaonkar <va...@gmail.com> on 2016/03/03 15:43:09 UTC

How to throw an exception from camel route

I am calling a camel route from java class using a proxy.
I wanted the camel route to throw an exception on certain condition (in my
case when it hits 404 response).
The java class needs to be capable for catching this exception and and
process further.

Please let me know how to achieve this. I am using spring DSL for the same.

Thanks.



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-throw-an-exception-from-camel-route-tp5778549.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to throw an exception from camel route

Posted by Claus Ibsen <cl...@gmail.com>.
There is a <throwException> you can use from Spring DSL.

On Thu, Mar 3, 2016 at 3:43 PM, ravivadgaonkar
<va...@gmail.com> wrote:
> I am calling a camel route from java class using a proxy.
> I wanted the camel route to throw an exception on certain condition (in my
> case when it hits 404 response).
> The java class needs to be capable for catching this exception and and
> process further.
>
> Please let me know how to achieve this. I am using spring DSL for the same.
>
> Thanks.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-throw-an-exception-from-camel-route-tp5778549.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2