"""Create error_monitor
Generated by Phi-Octopus Eden
2025-11-07 15:24:13.958231
"""

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


class ErrorMonitor:
    """
    A class for monitoring and handling errors in a Python application.
    
    This monitor allows registering error handlers to specific exception types,
    and automatically logs these exceptions with detailed information.
    """

    def __init__(self):
        self._error_handlers: Dict[type[Exception], Callable[[Exception], None]] = {}
        logging.basicConfig(level=logging.ERROR)

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

        :param exc_type: The type of exception to handle.
        :param handler: A function that takes an Exception and returns None.
        """
        self._error_handlers[exc_type] = handler

    def handle_error(self, e: Exception) -> None:
        """
        Handle the given error by logging it and calling any registered handlers.

        :param e: The exception to handle.
        """
        # Log the error with a detailed stack trace
        logging.error("Error occurred", exc_info=e)

        # Call all handlers that are registered for this type of exception
        handler = self._error_handlers.get(type(e))
        if handler:
            handler(e)


def example_usage() -> None:
    """
    Example usage of ErrorMonitor with a simple function.
    """

    def handle_value_error(error: ValueError) -> None:
        print(f"ValueError caught: {str(error)}")

    monitor = ErrorMonitor()
    monitor.register_error_handler(ValueError, handle_value_error)

    try:
        int("not a number")
    except ValueError as e:
        monitor.handle_error(e)


if __name__ == "__main__":
    example_usage()

```