"""Create fallback_executor
Generated by Phi-Octopus Eden
2025-11-07 23:39:01.820371
"""

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


class FallbackExecutor:
    """
    A class for creating a fallback executor that can handle exceptions and provide alternative execution paths.
    
    Attributes:
        main_function (Callable): The primary function to execute.
        fallback_functions (Dict[str, Callable]): Dictionary mapping error types to their respective fallback functions.
        default_fallback (Optional[Callable]): Default fallback function to use if no specific one is found for an error type.
    """
    
    def __init__(self, main_function: Callable[..., Any], fallback_functions: Dict[type, Callable[..., Any]], default_fallback: Optional[Callable[..., Any]] = None):
        self.main_function = main_function
        self.fallback_functions = {k.__name__: v for k, v in fallback_functions.items()}
        self.default_fallback = default_fallback
    
    def execute_with_fallback(self, *args, **kwargs) -> Any:
        """
        Execute the main function and handle exceptions using the specified fallback functions.
        
        Args:
            *args: Positional arguments to pass to the main function.
            **kwargs: Keyword arguments to pass to the main function.
            
        Returns:
            The result of the executed function or its fallback if an error occurs.
        """
        try:
            return self.main_function(*args, **kwargs)
        except Exception as e:
            error_type = type(e).__name__
            fallback_func = self.fallback_functions.get(error_type, self.default_fallback)
            if fallback_func is not None:
                return fallback_func(*args, **kwargs)
            else:
                raise


# Example usage
def main_function(x: int) -> str:
    result = 1 / x
    return f"Result: {result}"

def divide_by_zero_fallback(x: int) -> str:
    return "Caught a Divide by Zero error. Handling it gracefully."

fallback_executor = FallbackExecutor(
    main_function,
    fallback_functions={
        'ZeroDivisionError': divide_by_zero_fallback
    },
    default_fallback=None
)

# Testing the execution
try:
    print(fallback_executor.execute_with_fallback(5))
except Exception as e:
    print(f"An unexpected error occurred: {e}")

try:
    print(fallback_executor.execute_with_fallback(0))
except Exception as e:
    print(f"An unexpected error occurred: {e}")
```