"""Create fallback_executor
Generated by Phi-Octopus Eden
2025-11-06 09:28:50.349001
"""

```python
from typing import Callable, Any


class FallbackExecutor:
    """
    A class to handle function execution with fallback strategies in case of errors.

    Attributes:
        primary_function (Callable): The main function to execute.
        fallback_functions (list[Callable]): List of functions to try if the primary function fails.
    
    Methods:
        run: Execute the primary function or a fallback if an exception is raised.
    """

    def __init__(self, primary_function: Callable, *fallback_functions: Callable):
        self.primary_function = primary_function
        self.fallback_functions = list(fallback_functions)

    def run(self) -> Any:
        """
        Attempt to execute the primary function. If it raises an exception,
        try each fallback function in sequence until one succeeds or they all fail.

        Returns:
            The result of the first successful execution.
        
        Raises:
            Exception: If no fallback functions are available and all raise exceptions.
        """
        for func in [self.primary_function] + self.fallback_functions:
            try:
                return func()
            except Exception as e:
                print(f"Attempt to execute {func.__name__} failed with error: {e}")
        else:
            raise RuntimeError("No fallback functions were successful.")


# Example usage
def safe_division(a: float, b: float) -> float:
    """Safe division that handles ZeroDivisionError."""
    return a / b


def safe_subtraction(a: float, b: float) -> float:
    """Safe subtraction that does not require inputs to be positive."""
    return a - b


def dangerous_division(a: float, b: float) -> float:
    """A division function that might result in ZeroDivisionError and ValueError for non-numeric inputs."""
    if isinstance(b, (int, float)) and b != 0:
        return a / b
    raise ZeroDivisionError("Cannot divide by zero.")


# Create a FallbackExecutor instance with different fallback strategies
executor = FallbackExecutor(
    primary_function=dangerous_division,
    fallback_functions=[safe_division, safe_subtraction]
)

try:
    # Attempt to execute the function using the executor
    result = executor.run(a=5.0, b=0)
except Exception as e:
    print(f"Final error: {e}")
else:
    print(f"The result is: {result}")
```