Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Replace all xbt_ex(host_error) throwing location with HostFailureException
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 25 Aug 2018 19:35:15 +0000 (21:35 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 25 Aug 2018 19:35:15 +0000 (21:35 +0200)
src/simix/ActorImpl.cpp
src/simix/smx_host.cpp
src/simix/smx_network.cpp

index f8c6f8a..a5bbba8 100644 (file)
@@ -451,9 +451,8 @@ void SIMIX_process_kill(smx_actor_t process, smx_actor_t issuer) {
 
   /* destroy the blocking synchro if any */
   if (process->waiting_synchro != nullptr) {
-    if (process->host_->is_off()) {
-      SMX_EXCEPTION(process, host_error, 0, "Host failed");
-    }
+    if (process->host_->is_off())
+      process->exception = std::make_exception_ptr(simgrid::HostFailureException(XBT_THROW_POINT, "Host failed"));
     simgrid::kernel::activity::ExecImplPtr exec =
         boost::dynamic_pointer_cast<simgrid::kernel::activity::ExecImpl>(process->waiting_synchro);
     simgrid::kernel::activity::CommImplPtr comm =
index 1e90d37..779e2dc 100644 (file)
@@ -129,7 +129,8 @@ void SIMIX_execution_finish(smx_activity_t synchro)
       case SIMIX_FAILED:
         XBT_DEBUG("SIMIX_execution_finished: host '%s' failed", simcall->issuer->host_->get_cname());
         simcall->issuer->context_->iwannadie = 1;
-        SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
+        simcall->issuer->exception =
+            std::make_exception_ptr(simgrid::HostFailureException(XBT_THROW_POINT, "Host failed"));
         break;
 
       case SIMIX_CANCELED:
index c7afaa8..ea0d502 100644 (file)
@@ -521,7 +521,8 @@ void SIMIX_comm_finish(smx_activity_t synchro)
 
     if (simcall->issuer->host_->is_off()) {
       simcall->issuer->context_->iwannadie = 1;
-      SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
+      simcall->issuer->exception =
+          std::make_exception_ptr(simgrid::HostFailureException(XBT_THROW_POINT, "Host failed"));
     } else {
       switch (comm->state_) {