"""Create fallback_executor
Generated by Phi-Octopus Eden
2025-11-08 03:29:47.055208
"""

```python
from typing import Callable, Any


class FallbackExecutor:
    """
    A class for executing functions with fallback error handling.

    This class provides a way to run a primary function while having one or more fallback functions that are
    triggered if an exception occurs during the execution of the primary function. The first successful call
    among them will be returned.

    :param primary_function: Callable representing the primary function to execute.
    :param fallback_functions: A list of Callables which are fallbacks for the primary function.
    """

    def __init__(self, primary_function: Callable[..., Any], fallback_functions: list[Callable[..., Any]]):
        self.primary_function = primary_function
        self.fallback_functions = fallback_functions

    def execute(self) -> Any:
        """
        Execute the primary function or one of the fallback functions if an exception occurs.

        :return: The result of the first successful function call.
        """
        for func in [self.primary_function] + self.fallback_functions:
            try:
                return func()
            except Exception as e:
                print(f"Error occurred while executing {func.__name__}: {str(e)}")
                continue
        raise RuntimeError("All functions failed to execute successfully")


# Example usage

def primary_function() -> str:
    """
    A sample primary function that might fail.
    """
    return "Primary result"

def fallback1() -> str:
    """
    A sample fallback function 1.
    """
    return "Fallback 1 result"

def fallback2() -> str:
    """
    A sample fallback function 2.
    """
    raise Exception("This function intentionally fails to demonstrate error handling.")
    return "Fallback 2 result"


# Creating an instance of FallbackExecutor
executor = FallbackExecutor(primary_function, [fallback1, fallback2])

# Executing the functions with the FallbackExecutor
result = executor.execute()
print(f"Final result: {result}")
```