} else { log.error(text);
    private void handleError(ByteBuffer buffer, String text, boolean disconnect)            throws ProtocolViolationException {        // FEATURE allow configurable recovery position        //int newOffset = messageStartPosition + 1;        // Following recovery position is compatible with QuickFIX C++        // but drops messages unnecessarily in corruption scenarios.        int newOffset = bodyStartPosition + bodyLength;        int nextHeader = indexOf(buffer, newOffset, HEADER_PATTERN);          if (nextHeader != -1) {            buffer.position(nextHeader);        } else {            buffer.position(buffer.limit());        }        // TODO REVIEW how is this related to resetState?        state = SEEKING_HEADER;        position = 0;        bodyLength = 0;        if (disconnect) {            throw new CriticalSessionProtocolException(text);        }    }