Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remote Exec should not survive to a host failure
[simgrid.git] / src / s4u / s4u_Link.cpp
index c4c179c98bc48b2024981d7eb515544972d7cc9e..9c6d41a8c9bb95be6e44cf9d97650dba48aed0a9 100644 (file)
@@ -104,9 +104,9 @@ Link* Link::set_bandwidth(double value)
 
 Link* Link::set_sharing_policy(Link::SharingPolicy policy, const NonLinearResourceCb& cb)
 {
-  if (policy == SharingPolicy::SPLITDUPLEX)
-    throw std::invalid_argument(std::string("Impossible to set split-duplex for the link: ") + get_name() +
-                                std::string(". Use NetZone::create_split_duplex_link."));
+  if (policy == SharingPolicy::SPLITDUPLEX || policy == SharingPolicy::WIFI)
+    throw std::invalid_argument(std::string("Impossible to set wifi or split-duplex for the link: ") + get_name() +
+                                std::string(". Use appropriate create function in NetZone."));
 
   kernel::actor::simcall([this, policy, &cb] { pimpl_->set_sharing_policy(policy, cb); });
   return this;