From: Martin Quinson Date: Sat, 25 Aug 2018 19:35:15 +0000 (+0200) Subject: Replace all xbt_ex(host_error) throwing location with HostFailureException X-Git-Tag: v3_21~169 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/343a69a0fd4edaa7143e2cf15256bfa65dbd9e5d Replace all xbt_ex(host_error) throwing location with HostFailureException --- diff --git a/src/simix/ActorImpl.cpp b/src/simix/ActorImpl.cpp index f8c6f8ae21..a5bbba8106 100644 --- a/src/simix/ActorImpl.cpp +++ b/src/simix/ActorImpl.cpp @@ -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(process->waiting_synchro); simgrid::kernel::activity::CommImplPtr comm = diff --git a/src/simix/smx_host.cpp b/src/simix/smx_host.cpp index 1e90d37302..779e2dcc6b 100644 --- a/src/simix/smx_host.cpp +++ b/src/simix/smx_host.cpp @@ -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: diff --git a/src/simix/smx_network.cpp b/src/simix/smx_network.cpp index c7afaa8e1d..ea0d502246 100644 --- a/src/simix/smx_network.cpp +++ b/src/simix/smx_network.cpp @@ -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_) {