"""Create fallback_executor
Generated by Phi-Octopus Eden
2025-11-07 07:34:11.370729
"""

```python
from typing import Callable, Any


class FallbackExecutor:
    """
    A class for executing a function with fallbacks in case of errors.
    
    :param func: The main function to execute.
    :type func: Callable[..., Any]
    :param fallback_func: The fallback function to call if the main function raises an error.
    :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_with_fallback(self, *args: Any, **kwargs: Any) -> Any:
        """
        Execute the main function. If an error occurs during execution,
        call the fallback function.
        
        :param args: Positional arguments to pass to func and fallback_func.
        :type args: Tuple[Any]
        :param kwargs: Keyword arguments to pass to func and fallback_func.
        :type kwargs: Dict[str, Any]
        :return: The result of the main or fallback function execution.
        """
        try:
            return self.func(*args, **kwargs)
        except Exception as e:
            print(f"Error occurred in main function: {e}")
            return self.fallback_func(*args, **kwargs)


# 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 with fallback to returning 0 if the divisor is zero."""
    return x / (y + 1)  # Simulating a safe divide by ensuring no zero division error


# Create instances
safe_divisor = FallbackExecutor(divide_numbers, safe_divide_numbers)

# Test without error
result_without_error = safe_divisor.execute_with_fallback(10, 2)
print(f"Result: {result_without_error}")  # Expected: 5.0

# Test with an error (simulating division by zero)
try:
    result_with_error = safe_divisor.execute_with_fallback(10, 0)
except ZeroDivisionError:
    print("Caught a ZeroDivisionError and handled it gracefully.")
else:
    print(f"Result: {result_with_error}")
```