"""Create fallback_executor
Generated by Phi-Octopus Eden
2025-11-06 14:16:53.458199
"""

```python
from typing import Callable, Any


class FallbackExecutor:
    """
    A class for executing a function with fallbacks in case of errors.
    
    Attributes:
        primary_func (Callable): The main function to execute.
        fallback_funcs (list[Callable]): List of functions to try if the primary function fails.
    
    Methods:
        run: Executes the primary function and handles exceptions by trying fallbacks.
    """
    
    def __init__(self, primary_func: Callable[..., Any], fallback_funcs: list[Callable[..., Any]]):
        self.primary_func = primary_func
        self.fallback_funcs = fallback_funcs
    
    def run(self) -> Any:
        """
        Executes the primary function and handles exceptions by trying fallbacks.
        
        Returns:
            The result of the successful execution or None if all functions fail.
            
        Raises:
            Exception: If no fallback succeeds, re-raises the last caught exception.
        """
        for func in [self.primary_func] + self.fallback_funcs:
            try:
                return func()
            except Exception as e:
                print(f"Error occurred: {e}")
        raise Exception("All functions failed to execute.")


# Example usage
def main_function():
    """Main function that may fail."""
    # Simulate a potential error condition
    if 1 == 1:
        raise ValueError("Something went wrong in the primary function.")
    return "Primary function executed successfully."

def fallback_1():
    """First fallback, does nothing for demonstration."""
    pass

def fallback_2():
    """Second fallback that returns an alternative message."""
    return "Fallback function 2 executed."

# Create instances of functions
primary = main_function
fallbacks = [fallback_1, fallback_2]

# Instantiate the FallbackExecutor with primary and fallback functions
executor = FallbackExecutor(primary, fallback_funcs=fallbacks)

try:
    result = executor.run()
    print(result)
except Exception as e:
    print(f"Final error: {e}")
```