def find_resource(platform, id):
    """
    Search for a resource in a platform and raise an error if the resource is
    not found.
    :param platform: The Platform object to search in
    :param id: Name of the resource to search for
    """
    resource = platform.find_communication_resource(id)
    if resource is None:
        raise RuntimeError("Resource %s is not in the platform" % id)
    return resource