"""Create fallback_executor
Generated by Phi-Octopus Eden
2025-11-07 08:50:45.389018
"""

```python
from typing import Callable, Any


class FallbackExecutor:
    """
    A class for executing a function and providing a fallback in case of an exception.

    :param func: The main function to be executed.
    :type func: Callable[..., Any]
    :param fallback_func: The function to be used as a fallback if the main function fails.
    :type fallback_func: Callable[..., Any]
    """

    def __init__(self, func: Callable[..., Any], fallback_func: Callable[..., Any]):
        self.func = func
        self.fallback_func = fallback_func

    def execute(self, *args, **kwargs) -> Any:
        """
        Execute the main function with provided arguments and catch exceptions to use the fallback.

        :param args: Positional arguments for the main function.
        :param kwargs: Keyword arguments for the main function.
        :return: The result of the executed main or fallback function.
        """
        try:
            return self.func(*args, **kwargs)
        except Exception as e:
            print(f"An error occurred during execution: {e}")
            return self.fallback_func(*args, **kwargs)


# Example usage
def divide(a: int, b: int) -> float:
    """Divide two numbers."""
    return a / b


def add(a: int, b: int) -> int:
    """Add two numbers."""
    return a + b

fallback_executor = FallbackExecutor(divide, add)

# Test cases
print(fallback_executor.execute(10, 2))  # Should print 5.0
print(fallback_executor.execute(10, 0))  # Should use the fallback and print 10
```