def METHOD_NAME(self, exc: Exception) -> bool:
    """Calls ``on_error()`` for all listeners if they implement it.
    :returns: ``True`` if at least one error handler was called.
    """
    was_handled = False
    for listener in self.listeners:
        if hasattr(listener, "on_error"):
            try:
                listener.on_error(exc)
            except NotImplementedError:
                pass
            else:
                was_handled = True
    return was_handled