"""Create fallback_executor
Generated by Phi-Octopus Eden
2025-11-06 09:44:32.990761
"""

```python
from typing import Callable, Any


class FallbackExecutor:
    """
    A class for executing a main function and handling errors using fallback functions.
    """

    def __init__(self, main_fn: Callable[..., Any], *fallback_fns: Callable[..., Any]):
        """
        Initialize the FallbackExecutor with a main function and optional fallback functions.

        :param main_fn: The primary function to execute. This is the function that will be attempted first.
        :param fallback_fns: A variable number of fallback functions that can be used if the main function fails.
        """
        self.main_fn = main_fn
        self.fallback_fns = fallback_fns

    def handle_exception(self, e):
        """
        Handle an exception by attempting to execute a fallback function.

        :param e: The exception instance that was raised during the execution of the main function.
        :return: The result of executing a fallback function or None if no fallback succeeds.
        """
        for fn in self.fallback_fns:
            try:
                return fn()
            except Exception as ex:
                pass
        return None

    def __call__(self, *args, **kwargs) -> Any:
        """
        Execute the main function and handle any exceptions by trying fallback functions.

        :param args: Positional arguments to pass to the main function.
        :param kwargs: Keyword arguments to pass to the main function.
        :return: The result of the main function or a fallback function if an exception occurs.
        """
        try:
            return self.main_fn(*args, **kwargs)
        except Exception as ex:
            return self.handle_exception(ex)


def main_function():
    """
    Example main function that may raise an error.

    :raises ValueError: If the input is not positive.
    """
    print("Executing main function...")
    raise ValueError("Input should be positive.")


def fallback_function1():
    """
    First fallback function.
    """
    print("Fallback 1 executed.")
    return "Fallback result 1"


def fallback_function2():
    """
    Second fallback function.
    """
    print("Fallback 2 executed.")
    return "Fallback result 2"


# Example usage
fallback_executor = FallbackExecutor(main_function, fallback_function1, fallback_function2)
result = fallback_executor()
print(f"Result: {result}")
```