code: protected void exceptionCaught(IoSession session, Throwable cause) {
      log.error("Exception while communicating with " + this + ".", cause);
      // Nothing to do if we have no memory
      if (cause instanceof OutOfMemoryError) {
        System.exit(1);
      }
      if (this.disconnectOnException) {
        this._disconnect();
      }
    }
docs: Responds to exceptions and errors on the aggregator session. If
  {@code #disconnectOnException} is {@code true}, then disconnects from the
  aggregator. An OutOfMemory error will force a JVM exit.
  
  @param session
  the session that threw the exception or error.
  @param cause
  the Throwable that was thrown.