def abort(self, exception=None):
    if self.hasstatus('aborted'):
        return
    self.status = ComponentEvent('aborted', self, exception)
    for child in self.children:
        if (child.settings().get('error-propagation') in ('none', 'up')):
            if ('events' in self._debug):
                self.debug(f'Suppressing error propagation to child {child.id}')
        elif (not child.hasstatus('aborted')):
            if ('events' in self._debug):
                self.debug(f'Propagating error to child {child.id}')
            child.abort()
    if self.parent:
        if (self.parent.settings().get('error-propagation') in ('none', 'down')):
            if ('events' in self._debug):
                self.debug(f'Suppressing error propagation to parent {self.parent.id}')
        elif (not self.parent.hasstatus('aborted')):
            if ('events' in self._debug):
                self.debug(f'Propagating error to parent {self.parent.id}')
            self.parent.abort(exception)
def abort(self, exception=None):
    if self.hasstatus('aborted'):
        return
    self.status = ComponentEvent('aborted', self, exception)
    for child in self.children:
        if (child.settings().get('error-propagation') in ('none', 'up')):
            if ('events' in self._debug):
                self.debug(f'Suppressing error propagation to child {child.id}')
        elif (not child.hasstatus('aborted')):
            if ('events' in self._debug):
                self.debug(f'Propagating error to child {child.id}')
            child.abort()
    if self.parent:
        if (self.parent.settings().get('error-propagation') in ('none', 'down')):
            if ('events' in self._debug):
                self.debug(f'Suppressing error propagation to parent {self.parent.id}')
        elif (not self.parent.hasstatus('aborted')):
            if ('events' in self._debug):
                self.debug(f'Propagating error to parent {self.parent.id}')
            self.parent.abort(exception)