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