def _check_index(self):
        assert 0 <= self._index <= len(self._history) - 1
        # There should always be the base item at least.
        assert len(self._history) >= 1
executes the given function, catches all exceptions and converts to a warning.
dataset/ETHPy150Open kwikteam/phy/phy/cluster/manual/_history.py/History._check_index--crossover with--dataset/ETHPy150Open ralfonso/theory/theory/model/mpdutil.py/warn_exception