示例#1
0
 @Override
 public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { // (4)
   // Close the connection when an exception is raised.
   cause.printStackTrace();
   ctx.close();
 }
示例#2
0
 @Override
 public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
   cause.printStackTrace();
   ctx.close();
 }