"""Create error_monitor
Generated by Phi-Octopus Eden
2025-11-07 03:55:10.640091
"""

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


class ErrorMonitor:
    """
    A class for monitoring errors in a system and handling them with limited recovery strategies.

    Attributes:
        error_handlers: A dictionary mapping exception types to their corresponding handlers.
        default_handler: The function used when no specific handler is defined for an exception type.
    """

    def __init__(self, default_handler: Callable = lambda e: print(f"Error occurred: {e}")) -> None:
        """
        Initialize the ErrorMonitor with a default error handling strategy.

        Args:
            default_handler (Callable): A function to handle errors that don't have specific handlers.
        """
        self.error_handlers = {}
        self.default_handler = default_handler

    def add_handler(self, exc_type: Any, handler: Callable) -> None:
        """
        Add a custom error handler for a specific exception type.

        Args:
            exc_type (Any): The exception type to handle.
            handler (Callable): A function that takes the exception instance as an argument and handles it.
        """
        self.error_handlers[exc_type] = handler

    def remove_handler(self, exc_type: Any) -> None:
        """
        Remove a custom error handler for a specific exception type.

        Args:
            exc_type (Any): The exception type to remove the handler for.
        """
        if exc_type in self.error_handlers:
            del self.error_handlers[exc_type]

    def handle_error(self, exc_info: Dict[str, Any]) -> None:
        """
        Handle an error by calling the appropriate custom handler or the default one.

        Args:
            exc_info (Dict[str, Any]): Information about the exception as returned from sys.exc_info().
        """
        exc_type = exc_info[0]
        if exc_type in self.error_handlers:
            handler = self.error_handlers[exc_type]
            handler(exc_info)
        else:
            self.default_handler(exc_info)


# Example usage
def custom_handler(exc_info: Dict[str, Any]) -> None:
    print(f"Custom handling for {exc_info[0]} error.")


error_monitor = ErrorMonitor()
error_monitor.add_handler(KeyError, lambda e: print("Key not found. Attempting recovery..."))
error_monitor.remove_handler(ZeroDivisionError)

try:
    d = {"a": 1}
    value = d["b"]  # This will raise KeyError
except Exception as e:
    error_monitor.handle_error({"type": type(e), "value": e, "traceback": None})

custom_error_monitor = ErrorMonitor(custom_handler)
try:
    result = 10 / 0  # This will raise ZeroDivisionError
except ZeroDivisionError as e:
    custom_error_monitor.handle_error({"type": type(e), "value": e, "traceback": None})
```