You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by fbarbat <fb...@gmail.com> on 2013/04/18 17:41:32 UTC

How to set a custom ExceptionHandler to a consumer

Hi,

I have a route definition like this:

from("netty:tcp:...").transform(constant("hello"));

How can I set a custom ExceptionHandler to the netty consumer created from
that route?

Thanks.



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-set-a-custom-ExceptionHandler-to-a-consumer-tp5731097.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to set a custom ExceptionHandler to a consumer

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

I found the issue is a bug, as the netty component need to configure
the consumer when its created. So I have logged a ticket
https://issues.apache.org/jira/browse/CAMEL-6312

On Thu, Apr 18, 2013 at 5:53 PM, fbarbat <fb...@gmail.com> wrote:
> Hi Valerian,
>
> I was talking about org.apache.camel.spi.ExceptionHandler. As far as I know,
> OnException does not catch exceptions thrown inside the consumer such as
> java.nio.channels.ClosedChannelException.
>
> Any ideas?
>
> Thanks.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-set-a-custom-ExceptionHandler-to-a-consumer-tp5731097p5731099.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: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: How to set a custom ExceptionHandler to a consumer

Posted by fbarbat <fb...@gmail.com>.
Hi Valerian,

I was talking about org.apache.camel.spi.ExceptionHandler. As far as I know,
OnException does not catch exceptions thrown inside the consumer such as 
java.nio.channels.ClosedChannelException. 

Any ideas?

Thanks.



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-set-a-custom-ExceptionHandler-to-a-consumer-tp5731097p5731099.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to set a custom ExceptionHandler to a consumer

Posted by "valerian.merkling" <va...@capgemini.com>.
from("netty:tcp:...").onException(MyEx).dosomethings.end().transform(constant("hello"));

http://camel.apache.org/exception-clause.html




--
View this message in context: http://camel.465427.n5.nabble.com/How-to-set-a-custom-ExceptionHandler-to-a-consumer-tp5731097p5731098.html
Sent from the Camel - Users mailing list archive at Nabble.com.