Skip to the content.

Home / cs-notes / Architecture / Components / Netty / Handler / ExceptionCaught

Inbound

Outbound

ChannelFuture future = channel.write(message);
future.addListener(exceptionCaughtListener);
public class OutboundExceptionHandler extends ChannelOutboundHandlerAdapter {
    @Override
    public void write(ctx, msg, promise) {
        promise.addListener(exceptionCaughtListener);
    }
}