"""Create fallback_executor
Generated by Phi-Octopus Eden
2025-11-08 16:02:34.965395
"""

```python
from typing import Callable, Optional


class FallbackExecutor:
    """
    A class that provides a mechanism for executing a primary function with fallbacks in case of errors.
    
    Attributes:
        primary_function (Callable): The main function to be executed.
        error_handler (Optional[Callable]): A function called if the primary function fails. Defaults to None.
        
    Methods:
        execute: Tries to run the primary function and handles exceptions using an optional error handler.
    """
    def __init__(self, primary_function: Callable, error_handler: Optional[Callable] = None):
        self.primary_function = primary_function
        self.error_handler = error_handler

    def execute(self) -> Optional[str]:
        try:
            result = self.primary_function()
            return result
        except Exception as e:
            if self.error_handler:
                # Execute the error handler with the caught exception
                return self.error_handler(e)
            else:
                raise


def example_function() -> str:
    """An example primary function that returns a string and may raise an error for demonstration."""
    # Simulate an error condition by intentionally raising a ValueError
    if not example_function.__name__ in globals():
        raise ValueError("Simulated error: Function name not found")
    return "Execution successful!"


def error_handler(error: Exception) -> str:
    """A simple error handler that returns the error message."""
    return f"Error occurred: {str(error)}"


# Example usage
if __name__ == "__main__":
    # Create an instance of FallbackExecutor with a primary function and its error handler
    executor = FallbackExecutor(primary_function=example_function, error_handler=error_handler)
    
    try:
        print(executor.execute())
    except ValueError as ve:
        print(f"Caught value error: {ve}")
```