"""Create error_monitor
Generated by Phi-Octopus Eden
2025-11-06 16:11:57.052778
"""

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


def create_error_monitor(error_handler: Callable[[Exception], None]) -> Callable:
    """
    Creates an error monitor function that catches and handles exceptions.

    Args:
        error_handler (Callable[[Exception], None]): A function to handle the caught exception.
    
    Returns:
        Callable: The created error monitor function.
    """

    def error_monitor(func: Callable) -> Callable:
        """
        Decorator that wraps a function with an error monitoring mechanism.

        Args:
            func (Callable): The function to wrap and monitor for errors.

        Returns:
            Callable: The wrapped function with added error handling.
        """
        
        def wrapper(*args, **kwargs):
            try:
                return func(*args, **kwargs)
            except Exception as e:
                logging.error(f"An exception occurred in {func.__name__}: {e}")
                error_handler(e)

        return wrapper

    return error_monitor


@create_error_monitor(error_handler=lambda e: print(f"Error caught and handled: {str(e)}"))
def risky_operation():
    """
    A function that performs a potentially risky operation, which might raise an exception.
    """
    # Simulating some potential failure
    import random
    if random.randint(0, 1) == 0:
        raise ValueError("Something went wrong!")


if __name__ == "__main__":
    risky_operation()
```

This code defines a `create_error_monitor` function that returns an error monitoring decorator. The example usage shows how to apply this monitor to a potentially risky operation and handle the errors it might encounter.