code: @Override
      public void exceptionCaught(NextFilter nextFilter, IoSession session,
              Throwable cause) throws Exception {
          ProxyIoSession proxyIoSession = (ProxyIoSession) session
                  .getAttribute(ProxyIoSession.PROXY_SESSION);
          proxyIoSession.setAuthenticationFailed(true);
          super.exceptionCaught(nextFilter, session, cause);
      }
docs: Called when an exception occurs in the chain. A flag is set in the
  {@link ProxyIoSession} session's instance to signal that handshake
  failed.
  
  @param chain the filter chain
  @param name the name assigned to this filter
  @param nextFilter the next filter