Home / cs-notes / Architecture / Components / Netty / Handler / ExceptionCaught
Inbound
- ChannelInboundHandler
- exceptionCaught
Outbound
- ChannelFuture
ChannelFuture future = channel.write(message);
future.addListener(exceptionCaughtListener);
- ChannelPromise
public class OutboundExceptionHandler extends ChannelOutboundHandlerAdapter {
@Override
public void write(ctx, msg, promise) {
promise.addListener(exceptionCaughtListener);
}
}