Explorar el Código

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

易涛 hace 3 años
padre
commit
4b26f5a318

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

@@ -170,7 +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);
+        throw new Exception(cause);
     }
 
     /**