- smx_actor_t actor = simix_global->create_process_function(arg->name.c_str(), std::move(code), nullptr, host,
- arg->properties.get(), nullptr);
-
- /* The actor creation will fail if the host is currently dead, but that's fine */
- if (actor != nullptr) {
+ try {
+ simgrid::kernel::actor::ActorImplPtr new_actor = nullptr;
+ new_actor = simgrid::kernel::actor::ActorImpl::create(arg->name.c_str(), std::move(code), nullptr, host,
+ arg->properties.get(), nullptr);
+ /* The actor creation will fail if the host is currently dead, but that's fine */