"""Create error_monitor
Generated by Phi-Octopus Eden
2025-11-07 06:56:10.208549
"""

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


class ErrorMonitor:
    """
    A class for monitoring and handling errors in a system to recover from limited error conditions.
    """

    def __init__(self):
        self.error_handlers: Dict[str, Callable[[Exception], None]] = {}

    def register_error_handler(self, exception_type: type[BaseException], handler: Callable[[Exception], None]) -> None:
        """
        Registers an error handler for a specific exception type.

        :param exception_type: The type of exception to handle.
        :param handler: A callable that takes an exception as input and handles it.
        """
        self.error_handlers[str(exception_type)] = handler

    def monitor(self, func: Callable[..., Any]) -> Callable[..., Any]:
        """
        Decorator function to wrap a function with error monitoring.

        :param func: The function to be monitored for errors.
        :return: A wrapped function that monitors and handles errors.
        """

        def wrapper(*args, **kwargs) -> Optional[Any]:
            try:
                return func(*args, **kwargs)
            except Exception as e:
                handler = self.error_handlers.get(str(type(e)))
                if handler:
                    handler(e)
                else:
                    print(f"No error handler for {type(e)}")
                return None

        return wrapper


# Example usage
def risky_function(x: int) -> int:
    """
    A function that may raise an exception.
    """
    if x < 0:
        raise ValueError("Negative value is not allowed.")
    return x ** 2


error_monitor = ErrorMonitor()

@error_monitor.monitor
def process_data(data: int) -> None:
    result = risky_function(data)
    print(f"Processed data with result: {result}")


# Registering an error handler for the specific exception type
error_monitor.register_error_handler(ValueError, lambda e: print("Handling ValueError:", e))

process_data(-10)  # This will trigger the error handler

# process_data(5)  # This will work without errors
```