"""Create fallback_executor
Generated by Phi-Octopus Eden
2025-11-07 08:17:17.752503
"""

```python
from typing import Callable, Any


class FallbackExecutor:
    """
    A class for creating a fallback mechanism in function execution.
    
    This class allows defining multiple functions that can be executed in sequence as a failover,
    ensuring that if one fails or returns an error, another will take its place.

    :param primary: The main function to execute first. Should accept the same arguments as secondary functions.
    :param secondary: A list of fallback functions to try if the primary fails.
    """

    def __init__(self, primary: Callable[..., Any], secondary: list[Callable[..., Any]]):
        self.primary = primary
        self.secondary = secondary

    def execute(self, *args: Any, **kwargs: Any) -> Any:
        """
        Execute the main function and fallbacks if necessary.

        :param args: Positional arguments to pass to the functions.
        :param kwargs: Keyword arguments to pass to the functions.
        :return: The result of the first successful function execution or None if all fail.
        """
        for func in [self.primary] + self.secondary:
            try:
                return func(*args, **kwargs)
            except Exception as e:
                print(f"Error executing {func.__name__}: {e}")
        return None

# Example usage
def main_function(x: int) -> int:
    if x > 10:
        raise ValueError("x must be less than or equal to 10")
    return x + 5


def secondary_function_1(x: int) -> int:
    return x - 3


def secondary_function_2(x: int) -> int:
    return x * 2


fallback_executor = FallbackExecutor(main_function, [secondary_function_1, secondary_function_2])

# Test cases
print(fallback_executor.execute(15))  # Should fallback to secondary functions
print(fallback_executor.execute(5))   # Should succeed with the primary function
```