Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
fix (#324)
[simgrid.git] / src / simix / ActorImpl.cpp
index 00e499d..1123281 100644 (file)
@@ -79,6 +79,8 @@ ActorImplPtr ActorImpl::attach(std::string name, void* data, s4u::Host* host,
 
   if (not host->is_on()) {
     XBT_WARN("Cannot launch process '%s' on failed host '%s'", name.c_str(), host->get_cname());
+    std::rethrow_exception(
+        std::make_exception_ptr(simgrid::HostFailureException(XBT_THROW_POINT, "Cannot attach actor on failed host.")));
     return nullptr;
   }
 
@@ -450,6 +452,8 @@ ActorImplPtr ActorImpl::create(std::string name, simix::ActorCode code, void* da
 
   if (not host->is_on()) {
     XBT_WARN("Cannot launch actor '%s' on failed host '%s'", name.c_str(), host->get_cname());
+    std::rethrow_exception(
+        std::make_exception_ptr(simgrid::HostFailureException(XBT_THROW_POINT, "Cannot create actor on failed host.")));
     return nullptr;
   }