Change get_hosts_for_enviromnent() error conditions to raise exceptions.