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