def synchronous(function, event):
    """
    Runs the function synchronously taking care of exceptions.
    """
    try:
        function(event)
    except Exception as error:
        logger = get_function_logger(function)
        logger.exception(error)