X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/12e37132d1b9b141fa8497e17b0629cfd4173c36..2cf13759ba1696d88f5ff86afee5324f30ccdbfc:/src/simix/smx_host.cpp diff --git a/src/simix/smx_host.cpp b/src/simix/smx_host.cpp index 7bd756a321..33d574972f 100644 --- a/src/simix/smx_host.cpp +++ b/src/simix/smx_host.cpp @@ -47,7 +47,7 @@ SIMIX_execution_parallel_start(std::string name, int host_nb, const sg_host_t* h } simgrid::kernel::activity::ExecImplPtr exec = simgrid::kernel::activity::ExecImplPtr( - new simgrid::kernel::activity::ExecImpl(name, "", timeout_detector, nullptr)); + new simgrid::kernel::activity::ExecImpl(std::move(name), "", timeout_detector, nullptr)); if (surf_action != nullptr) { exec->surf_action_ = surf_action; exec->surf_action_->set_data(exec.get()); @@ -105,20 +105,21 @@ void SIMIX_execution_finish(smx_activity_t synchro) break; case SIMIX_FAILED: - XBT_DEBUG("SIMIX_execution_finished: host '%s' failed", simcall->issuer->host_->get_cname()); + XBT_DEBUG("SIMIX_execution_finished: host '%s' failed", simcall->issuer->get_host()->get_cname()); simcall->issuer->context_->iwannadie = true; - simcall->issuer->exception = + simcall->issuer->exception_ = std::make_exception_ptr(simgrid::HostFailureException(XBT_THROW_POINT, "Host failed")); break; case SIMIX_CANCELED: XBT_DEBUG("SIMIX_execution_finished: execution canceled"); - SMX_EXCEPTION(simcall->issuer, cancel_error, 0, "Canceled"); + simcall->issuer->exception_ = + std::make_exception_ptr(simgrid::CancelException(XBT_THROW_POINT, "Execution Canceled")); break; case SIMIX_TIMEOUT: XBT_DEBUG("SIMIX_execution_finished: execution timeouted"); - simcall->issuer->exception = std::make_exception_ptr(simgrid::TimeoutError(XBT_THROW_POINT, "Timeouted")); + simcall->issuer->exception_ = std::make_exception_ptr(simgrid::TimeoutError(XBT_THROW_POINT, "Timeouted")); break; default: @@ -129,7 +130,7 @@ void SIMIX_execution_finish(smx_activity_t synchro) simcall_execution_wait__set__result(simcall, exec->state_); /* Fail the process if the host is down */ - if (simcall->issuer->host_->is_on()) + if (simcall->issuer->get_host()->is_on()) SIMIX_simcall_answer(simcall); else simcall->issuer->context_->iwannadie = true;