} catch (simgrid::TimeoutError& e) {
status = MSG_TIMEOUT;
} catch (xbt_ex& e) {
- switch (e.category) {
- case cancel_error:
+ if (e.category == cancel_error)
status = MSG_TASK_CANCELED;
- break;
- default:
+ else
throw;
- }
}
/* action ended, set comm and compute = nullptr, the actions is already destroyed in the main function */
finished = true;
}
catch (xbt_ex& e) {
- switch (e.category) {
- case network_error:
- comm->status = MSG_TRANSFER_FAILURE;
- finished = true;
- break;
- default:
- throw;
+ if (e.category == network_error) {
+ comm->status = MSG_TRANSFER_FAILURE;
+ finished = true;
+ } else {
+ throw;
}
}
comm->status = MSG_TIMEOUT;
}
catch (xbt_ex& e) {
- switch (e.category) {
- case network_error:
+ if (e.category == network_error)
comm->status = MSG_TRANSFER_FAILURE;
- break;
- default:
+ else
throw;
- }
}
return comm->status;
status = MSG_TIMEOUT;
}
catch(xbt_ex& e) {
- switch (e.category) {
- case network_error:
- finished_index = e.value;
- status = MSG_TRANSFER_FAILURE;
- break;
- default:
- throw;
+ if (e.category == network_error) {
+ finished_index = e.value;
+ status = MSG_TRANSFER_FAILURE;
+ } else {
+ throw;
}
}