'Add a field to the field set:
* add it into _fields
* update _current_size
May raise a StopIteration() on error'

def _addField(self, field):

    if (not issubclass(field.__class__, Field)):
        raise ParserError(("Field    type    (%s)    is    not    a    subclass    of    'Field'!" % field.__class__.__name__))
    assert isinstance(field._name, str)
    if field._name.endswith('[]'):
        self.setUniqueFieldName(field)
    if config.debug:
        self.info(('[+]    DBG:    _addField(%s)' % field.name))
    if (field._address != self._current_size):
        self.warning(('Fix    address    of    %s    to    %s    (was    %s)' % (field.path, self._current_size, field._address)))
        field._address = self._current_size
    ask_stop = False
    self.__is_feeding = True
    try:
        field_size = field.size
    except HACHOIR_ERRORS as err:
        if (field.is_field_set and field.current_length and field.eof):
            self.warning(("Error    when    getting    size    of    '%s':    %s" % (field.name, err)))
            field._stopFeeding()
            ask_stop = True
        else:
            self.warning(("Error    when    getting    size    of    '%s':    delete    it" % field.name))
            self.__is_feeding = False
            raise
    self.__is_feeding = False
    dsize = self._checkSize((field._address + field.size), False)
    if (((dsize is not None) and (dsize < 0)) or (field.is_field_set and (field.size <= 0))):
        if (self.autofix and self._current_size):
            self._fixFieldSize(field, (field.size + dsize))
        else:
            raise ParserError(('Field    %s    is    too    large!' % field.path))
    self._current_size += field.size
    try:
        self._fields.append(field._name, field)
    except UniqKeyError as err:
        self.warning(('Duplicate    field    name    ' + unicode(err)))
        field._name += '[]'
        self.setUniqueFieldName(field)
        self._fields.append(field._name, field)
    if ask_stop:
        raise StopIteration()
