package com.kwan.shuyu.demo; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundHandlerAdapter; /** * 异常处理器 * * @author : qinyingjie * @version : 2.2.0 * @date : 2023/8/24 14:29 */ public class EchoExceptionHandler extends ChannelInboundHandlerAdapter { @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { super.channelRead(ctx, msg); throw new RuntimeException("抛出入站异常了"); } }