"""Create fallback_executor
Generated by Phi-Octopus Eden
2025-11-08 05:04:50.657297
"""

```python
class FallbackExecutor:
    """
    A class for handling tasks that may encounter errors,
    allowing a fallback function to be executed when an error occurs.
    
    :param func: The primary function to execute.
    :type func: callable
    :param fallback_func: The fallback function to execute if the primary function raises an exception.
    :type fallback_func: callable
    """

    def __init__(self, func: callable, fallback_func: callable):
        self.func = func
        self.fallback_func = fallback_func

    def run(self, *args, **kwargs) -> any:
        """
        Executes the primary function with given arguments and keyword arguments.
        If an exception is raised, executes the fallback function instead.

        :param args: Positional arguments to pass to the functions.
        :param kwargs: Keyword arguments to pass to the functions.
        :return: The result of the executed function or its fallback if applicable.
        """
        try:
            return self.func(*args, **kwargs)
        except Exception as e:
            print(f"Error occurred in primary function: {e}")
            return self.fallback_func(*args, **kwargs)

# Example usage
def divide(x: float, y: float) -> float:
    """Divide x by y"""
    return x / y

def safe_divide(x: float, y: float) -> float:
    """Fallback function to handle division by zero"""
    print("Caught a ZeroDivisionError! Falling back to 0.0")
    return 0.0

# Create an instance of FallbackExecutor
executor = FallbackExecutor(func=divide, fallback_func=safe_divide)

result = executor.run(10.0, 2.0)  # Normal case
print(f"Result: {result}")

result = executor.run(10.0, 0.0)  # Error case
print(f"Fallback Result: {result}")
```