throw HostFailureException(XBT_THROW_POINT, "Cannot attach actor on failed host.");
}
- auto* actor = new ActorImpl(std::string(name), host, /*ppid*/ -1);
+ auto* actor = new ActorImpl(name, host, /*ppid*/ -1);
/* Actor data */
actor->piface_.set_data(data);
actor->code_ = nullptr;
activity::ActivityImplPtr ActorImpl::sleep(double duration)
{
if (not host_->is_on())
- throw_exception(std::make_exception_ptr(HostFailureException(
- XBT_THROW_POINT, std::string("Host ") + host_->get_cname() + " failed, you cannot sleep there.")));
+ throw_exception(std::make_exception_ptr(
+ HostFailureException(XBT_THROW_POINT, "Host " + host_->get_name() + " failed, you cannot sleep there.")));
auto sleep_activity = new activity::SleepImpl();
sleep_activity->set_name("sleep").set_host(host_).set_duration(duration).start();