Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
convert some catch locations to simgrid::HostFailureException
[simgrid.git] / teshsuite / s4u / host_on_off_wait / host_on_off_wait.cpp
index 280536e..e8617e0 100644 (file)
@@ -21,9 +21,11 @@ static void master()
 static void worker()
 {
   XBT_INFO("Worker waiting");
-  // TODO, This should really be MSG_HOST_FAILURE
-  simgrid::s4u::this_actor::sleep_for(5);
-  XBT_ERROR("Worker should be off already.");
+  try {
+    simgrid::s4u::this_actor::sleep_for(5);
+  } catch (simgrid::HostFailureException& e) {
+    XBT_INFO("The host has died ... as expected.");
+  }
 }
 
 int main(int argc, char* argv[])