camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <>
Subject Re: Infinite recursion of exceptions. Is it a bug?
Date Fri, 05 May 2017 15:43:12 GMT
I have pushed a test and a possible fix to

As the code around error handling is pretty difficult to understand I am 
not sure if my solution is good. I would be happy if someone could 
review my change.


On 04.05.2017 17:30, Christian Schneider wrote:
> I have the routes below. When I send a message to direct:test I get an 
> infinite recursion of exceptions.
> The reason is that the onException handler also seems to be called for 
> the direct:handle_er that is called when handling the
> first exception. In case such a handler route also throws an exception 
> the recursion happens.
> Is this expected or a bug?
> If it is not a bug what do we recommend our users to avoid the recursion?
>                 onException(Throwable.class)
>                 .to("direct:handle_er");
>                 from("direct:test")
>                 .throwException(new RuntimeException())
>                 .to("log:test2");
>                 from("direct:handle_er")
>                 .throwException(new RuntimeException());
> See also
> Christian

Christian Schneider

Open Source Architect

View raw message