def get_failed_action_messages(exception):
    action_type = ActionType("sys:me", [], [])
    logger = MemoryLogger()
    action = action_type.as_task(logger=logger)
    try:
        with action:
            raise exception
    except exception.__class__:
        pass
    logger.validate()
    return logger.messages[1:]
Fail an action using the given exception.
dataset/ETHPy150Open ClusterHQ/eliot/eliot/tests/test_action.py/get_failed_action_messages