try {
simgrid::s4u::this_actor::execute(comp_size);
} catch (xbt_ex& e) {
- switch (e.category) {
- case host_error:
- XBT_INFO("Gloups. The cpu on which I'm running just turned off!. See you!");
- return -1;
- default:
- xbt_die("Unexpected behavior");
- }
+ if (e.category == host_error) {
+ XBT_INFO("Gloups. The cpu on which I'm running just turned off!. See you!");
+ return -1;
+ } else
+ xbt_die("Unexpected behavior");
}
}
XBT_INFO("I'm done. See you!");
simgrid::kernel::activity::ExecImplPtr exec = simgrid::kernel::activity::ExecImplPtr(
new simgrid::kernel::activity::ExecImpl(name, surf_action, /*timeout_detector*/ nullptr, host));
- exec->set_category(name);
+ exec->set_category(category);
XBT_DEBUG("Create execute synchro %p: %s", exec.get(), exec->name_.c_str());
simgrid::kernel::activity::ExecImpl::on_creation(exec);