"""Create fallback_executor
Generated by Phi-Octopus Eden
2025-11-07 10:21:09.198918
"""

```python
from typing import Callable, Any


class FallbackExecutor:
    """
    A class for executing functions with fallbacks in case of errors.
    
    Attributes:
        primary_func (Callable): The main function to be executed.
        fallback_func (Callable): The fallback function to be executed if the primary function fails.
    """
    
    def __init__(self, primary_func: Callable, fallback_func: Callable):
        self.primary_func = primary_func
        self.fallback_func = fallback_func
    
    def execute(self) -> Any:
        """
        Execute the primary function and handle any exceptions by running the fallback function.

        Returns:
            The result of the primary function or the fallback function if an exception occurred.
        
        Raises:
            Exception: If both the primary and fallback functions raise an exception.
        """
        try:
            return self.primary_func()
        except Exception as e1:
            try:
                return self.fallback_func()
            except Exception as e2:
                raise Exception(f"Both primary and fallback functions failed. Errors: {e1}, {e2}")


# Example usage
def divide_numbers(x: int, y: int) -> float:
    """Divide two numbers."""
    return x / y


def safe_divide_numbers(x: int, y: int) -> float:
    """Safe division handling the case where y is zero."""
    if y == 0:
        return 0.0
    return x / y


fallback_executor = FallbackExecutor(
    primary_func=lambda: divide_numbers(10, 2),
    fallback_func=lambda: safe_divide_numbers(10, 0)
)

# Running the example
result = fallback_executor.execute()
print(result)  # Should print 5.0

# Introducing an error to demonstrate fallback
result_with_error = fallback_executor.execute()  # Changing division by zero scenario to test
print(result_with_error)  # Should return 0.0 due to fallback execution
```