Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Change "if(...) xbt_die(...)" to "xbt_assert(...)".
[simgrid.git] / src / s4u / s4u_Host.cpp
index 81aa555..fdaf2ca 100644 (file)
@@ -69,8 +69,7 @@ Host* Host::by_name_or_null(const std::string& name)
 Host* Host::current()
 {
   kernel::actor::ActorImpl* self = kernel::actor::ActorImpl::self();
-  if (self == nullptr)
-    xbt_die("Cannot call Host::current() from the maestro context");
+  xbt_assert(self != nullptr, "Cannot call Host::current() from the maestro context");
   return self->get_host();
 }