{
// This can happen if the appropriate D-Bus policy is not
// installed, for example.
- throw std::runtime_error(std::string("Lost name \"")
- + name + "\" on D-Bus!");
+ g_warning("Lost name \"%s\" on D-Bus!", name);
}
// --------------------------------------------------------------
// Register the Agent implementation responsible for handling input
// requests for secure and hidden networks.
if (!g_variant_is_object_path(agent_.object_path())) {
- throw std::runtime_error(std::string("Invalid Agent object path: ")
- + agent_.object_path());
+ throw std::invalid_argument(std::string("Invalid Agent object path: ")
+ + agent_.object_path());
}
error = nullptr;
if (ret == nullptr) {
safe_error.reset(error);
- throw std::runtime_error(
- std::string("Unable to register agent: ") + error->message);
+ g_warning("Unable to register agent: %s. "
+ "Hidden and protected connections will "
+ "not be supported.\n",
+ error->message);
}
}