def update_current_state_name(self, mode):

        if self.debug:
            self.log.debug("Old current state name for mode %s: %s",
                           mode, self.enable_table[mode]['current_state_name'])

        try:
            self.enable_table[mode]['current_state_name'] = (
                self.enable_table[mode]['settings']['states']
                [self.player[self.enable_table[mode]['settings']
                ['player_variable']]]['name'])
        except __HOLE__:
            self.enable_table[mode]['current_state_name'] = None

        if self.debug:
            self.log.debug("New current state name for mode %s: %s",
                           mode, self.enable_table[mode]['current_state_name'])
dataset/ETHPy150Open missionpinball/mpf/mpf/devices/shot.py/Shot.update_current_state_name