Help for clarification on Exception handling

16 views
Skip to first unread message

Victor Noël

unread,
Sep 7, 2016, 4:08:00 AM9/7/16
to Netty discussions
Hi,

I'm not totally clear about how exceptions are handled in Netty's handlers.

Which exceptions are given to ChannelInboundHandler.exceptionCaught?

For example, if I do a ctx.writeAndFlush(...) and an exception happen (e.g., during serialization or during network send), I know I can get it from the ChannelFutureListener that I can attach to the ChannelFuture returned by write, but is the exception also going through the pipeline and is passed to ChannelInboundHandler.exceptionCaught?
And which handler is going to get it? The one where the exception got thrown (and passed to inbound handler up to the point it is handled)?
Is the exception only passed to the handler if there is no future attached to the write operation?

Thanks for any clarification :)

Victor
Reply all
Reply to author
Forward
0 new messages