Selaa lähdekoodia

将日志抛出来看是否能够捕获

易涛 3 vuotta sitten
vanhempi
commit
7a6866301f

+ 1 - 0
src/main/java/com/persagy/netty/client/CenterClientHandler.java

@@ -170,6 +170,7 @@ public class CenterClientHandler extends SimpleChannelInboundHandler<NettyMessag
     public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
         log.info("exceptionCaught", cause);
         ctx.close();
+        throw new RuntimeException(cause);
     }
 
     /**