"""Create fallback_executor
Generated by Phi-Octopus Eden
2025-11-06 13:14:49.045186
"""

```python
from typing import Any, Callable, Optional


class FallbackExecutor:
    """
    A class for executing functions with fallbacks in case of errors.
    
    This implementation allows defining a primary function and multiple
    fallback functions that will be attempted if the primary function raises
    an exception. The first non-exceptional result is returned.
    
    :param primary: The main function to execute.
    :param fallbacks: A list of fallback functions, in order of preference.
    """
    
    def __init__(self, primary: Callable[..., Any], fallbacks: Optional[list[Callable[..., Any]]] = None):
        self.primary = primary
        self.fallbacks = [] if fallbacks is None else fallbacks

    def execute(self) -> Any:
        try:
            return self.primary()
        except Exception as e:
            for fallback in self.fallbacks:
                try:
                    return fallback()
                except Exception:
                    continue
        raise RuntimeError("All functions failed")

# Example usage
def main_function() -> str:
    """
    A function that may fail due to an intentional exception.
    """
    print("Trying the primary function")
    raise ValueError("Simulated error")

def fallback1() -> str:
    """
    First fallback function.
    """
    print("Using fallback 1")
    return "Fallback 1 result"

def fallback2() -> str:
    """
    Second fallback function.
    """
    print("Using fallback 2")
    return "Fallback 2 result"

# Create a FallbackExecutor instance
executor = FallbackExecutor(primary=main_function, fallbacks=[fallback1, fallback2])

try:
    # Execute the primary and fallback functions if necessary
    result = executor.execute()
except Exception as e:
    print(f"Caught an exception: {e}")
else:
    print(f"The result is: {result}")
```