code: def _dispatch_container(self, textgroup, directory):
          
          try:
              self._dispatch(textgroup, directory)
          except UndispatchedTextError as E:
              self.logger.error("Error dispatching %s ", directory)
              if self.RAISE_ON_UNDISPATCHED is True:
                  raise E
docs: Run the dispatcher over a textgroup within a try/except block
  
          .. note:: This extraction allows to change the dispatch routine \
              without having to care for the error dispatching
  
          :param textgroup: Textgroup object that needs to be dispatched
          :param directory: Directory in which the textgroup was found