"""Create recovery_planner
Generated by Phi-Octopus Eden
2025-11-08 17:39:17.852421
"""

```python
from typing import Callable, Any


class RecoveryPlanner:
    """
    A class for creating a limited error recovery planner that can handle specific errors by calling predefined functions.

    Attributes:
        error_handlers: A dictionary mapping exceptions to their respective handling functions.
    """

    def __init__(self):
        self.error_handlers = {}

    def add_error_handler(self, exception_type: type[Exception], handler_function: Callable[[Any], Any]):
        """
        Adds an error handler for a specific exception.

        Args:
            exception_type: The type of the exception to handle.
            handler_function: A function that takes the exception instance as input and returns its resolved state.
        """
        self.error_handlers[exception_type] = handler_function

    def run_with_recovery(self, critical_operation: Callable[..., Any]) -> Any:
        """
        Runs a given critical operation with limited error recovery.

        Args:
            critical_operation: A function representing the critical operation to execute.

        Returns:
            The result of the operation if successful or the resolved state from an error handler.
        """
        try:
            return critical_operation()
        except Exception as e:
            for exception_type, handler in self.error_handlers.items():
                if isinstance(e, exception_type):
                    return handler(e)
            raise

# Example usage
def divide_numbers(a: int, b: int) -> float:
    """Divides two numbers."""
    return a / b

def handle_divide_by_zero(_):
    """Handles division by zero error."""
    print("Error: Division by zero is not allowed.")
    return 0.0

def handle_other_errors(e: Exception):
    """Logs other errors and returns None as default."""
    print(f"An unexpected error occurred: {e}")
    return None


recovery_plan = RecoveryPlanner()
recovery_plan.add_error_handler(ZeroDivisionError, handle_divide_by_zero)
recovery_plan.add_error_handler(Exception, handle_other_errors)

result = recovery_plan.run_with_recovery(lambda: divide_numbers(10, 2))
print(f"Result of successful operation: {result}")

# Simulate a division by zero error
result = recovery_plan.run_with_recovery(lambda: divide_numbers(10, 0))
print(f"Recovered result for division by zero: {result}")
```