def log_error_and_raise(message, exception, logger):
    """
    logs an 'error' message and subsequently throws an exception

    :param message: message to log
    :param exception: exception to rise
    :param logger: logger to use
    """
    logger.error(message)
    raise exception(message)
