"""Create recovery_planner
Generated by Phi-Octopus Eden
2025-11-06 22:24:24.042379
"""

```python
from typing import Callable, Dict


class RecoveryPlanner:
    """
    A class for managing limited error recovery strategies in a system.
    
    Attributes:
        strategy_map (Dict[str, Callable]): Maps error types to their respective recovery strategies.
    """

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

    def register_strategy(self, error_type: str, strategy: Callable) -> None:
        """
        Registers an error type and its associated recovery strategy.

        Args:
            error_type (str): The specific error type to recover from.
            strategy (Callable): A function that takes the error object as input and returns a recovery action.
        
        Raises:
            ValueError: If `error_type` is already registered.
        """
        if error_type in self.strategy_map:
            raise ValueError(f"Strategy for {error_type} is already registered.")
        self.strategy_map[error_type] = strategy

    def handle_error(self, error_obj) -> str:
        """
        Handles an error by executing the appropriate recovery strategy based on the error type.

        Args:
            error_obj (Exception): The error object that needs to be handled.
        
        Returns:
            str: A message indicating the outcome of the recovery action or failure.
        
        Raises:
            KeyError: If no registered strategy can handle the given error type.
        """
        if not isinstance(error_obj, Exception):
            raise TypeError("Expected an instance of `Exception` as the error object.")
        
        error_type = type(error_obj).__name__
        try:
            recovery_strategy = self.strategy_map[error_type]
            return recovery_strategy(error_obj)
        except KeyError:
            return f"No strategy to recover from {error_type}."

    def example_usage(self):
        """
        Demonstrates how the `RecoveryPlanner` class can be used.
        """

        # Example error types and strategies
        def handle_value_error(error: Exception) -> str:
            """Example recovery for ValueError."""
            return f"ValueError occurred, setting default value."

        self.register_strategy("ValueError", handle_value_error)

        try:
            raise ValueError("Some invalid input.")
        except Exception as e:
            print(self.handle_error(e))

        # Example usage
        self.example_usage()


# Create an instance of the recovery planner
recovery_planner = RecoveryPlanner()

# Example with a registered strategy
try:
    raise ValueError("Invalid input detected!")
except Exception as e:
    result = recovery_planner.handle_error(e)
    print(result)

# Example without a registered strategy
try:
    raise TypeError("Unexpected type encountered.")
except Exception as e:
    result = recovery_planner.handle_error(e)
    print(result)
```