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

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


class FallbackExecutor:
    """
    A class for executing tasks with fallback options in case of errors.
    
    This class allows setting up a main function and one or more fallback functions that can be executed 
    if the main function fails to execute successfully. It includes error handling to ensure seamless task execution.
    """

    def __init__(self, main_function: Callable[..., Any], fallback_functions: Optional[Dict[str, Callable[..., Any]]] = None):
        """
        Initialize FallbackExecutor with a main function and optional fallback functions.

        :param main_function: The primary function to execute.
        :type main_function: Callable[..., Any]
        :param fallback_functions: A dictionary of fallback functions keyed by their names (str).
        :type fallback_functions: Dict[str, Callable[..., Any]], optional
        """
        self.main_function = main_function
        self.fallback_functions = fallback_functions or {}

    def run(self) -> Any:
        """
        Execute the main function. If it fails, execute one of the fallback functions.

        :return: The result of the executed function.
        :rtype: Any
        """
        try:
            return self.main_function()
        except Exception as e:
            print(f"Main function failed with error: {e}")
            
            for name, func in self.fallback_functions.items():
                try:
                    print(f"Executing fallback function '{name}'...")
                    return func()
                except Exception as f_e:
                    print(f"Fallback function '{name}' failed with error: {f_e}")
                    
    def add_fallback(self, function_name: str, function: Callable[..., Any]):
        """
        Add a new fallback function to the FallbackExecutor.

        :param function_name: The name of the fallback function.
        :type function_name: str
        :param function: The fallback function to be added.
        :type function: Callable[..., Any]
        """
        self.fallback_functions[function_name] = function


# Example usage

def main_task():
    """Simulate a task that might fail due to some condition."""
    print("Executing the main task...")
    # Simulate failure
    raise ValueError("Something went wrong in the main task.")


def fallback_task_1():
    """A simple fallback task."""
    print("Executing fallback task 1...")
    return "Fallback 1 result"


def fallback_task_2():
    """Another fallback task that might also fail."""
    print("Executing fallback task 2...")
    raise RuntimeError("Fallback 2 encountered an issue.")


# Create FallbackExecutor instance with main and fallback functions
executor = FallbackExecutor(main_task, {"fallback_1": fallback_task_1, "fallback_2": fallback_task_2})

# Run the executor to see the fallback in action
result = executor.run()
print(f"The final result is: {result}")
`