- Nicer introduction page.
- Move Java as a subtree of MSG.
+General:
+ - Rename simgrid::TimeoutError to simgrid::TimeoutException.
+
XBT:
- Drop xbt_dynar_sort_strings().
simcall_cond_wait_timeout(cond_, lock.mutex()->mutex_, timeout);
return std::cv_status::no_timeout;
}
- catch (const simgrid::TimeoutError& e) {
+ catch (const simgrid::TimeoutException& e) {
// If the exception was a timeout, we have to take the lock again:
try {
lock.mutex()->lock();
try {
XBT_DEBUG("Sending a peer request to the tracker.");
tracker_mailbox->put(peer_request, TRACKER_COMM_SIZE, GET_PEERS_TIMEOUT);
- } catch (const simgrid::TimeoutError&) {
+ } catch (const simgrid::TimeoutException&) {
XBT_DEBUG("Timeout expired when requesting peers to tracker");
delete peer_request;
return false;
if (id != peer_id)
connected_peers.emplace(peer_id, Connection(peer_id));
delete answer;
- } catch (const simgrid::TimeoutError&) {
+ } catch (const simgrid::TimeoutException&) {
XBT_DEBUG("Timeout expired when requesting peers to tracker");
return false;
}
XBT_DEBUG("Sending a 'PREDECESSOR_LEAVING' to my successor %d", fingers_[0]);
try {
simgrid::s4u::Mailbox::by_name(std::to_string(fingers_[0]))->put(pred_msg, 10, timeout);
- } catch (const simgrid::TimeoutError&) {
+ } catch (const simgrid::TimeoutException&) {
XBT_DEBUG("Timeout expired when sending a 'PREDECESSOR_LEAVING' to my successor %d", fingers_[0]);
delete pred_msg;
}
try {
simgrid::s4u::Mailbox::by_name(std::to_string(pred_id_))->put(succ_msg, 10, timeout);
- } catch (const simgrid::TimeoutError&) {
+ } catch (const simgrid::TimeoutException&) {
XBT_DEBUG("Timeout expired when sending a 'SUCCESSOR_LEAVING' to my predecessor %d", pred_id_);
delete succ_msg;
}
XBT_DEBUG("Sending a 'Predecessor Alive' request to my predecessor %d", pred_id_);
try {
mailbox->put(message, 10, timeout);
- } catch (const simgrid::TimeoutError&) {
+ } catch (const simgrid::TimeoutException&) {
XBT_DEBUG("Failed to send the 'Predecessor Alive' request to %d", pred_id_);
delete message;
return;
comm->wait_for(timeout);
XBT_DEBUG("Received the answer to my 'Predecessor Alive': my predecessor %d is alive", pred_id_);
delete static_cast<ChordMessage*>(data);
- } catch (const simgrid::TimeoutError&) {
+ } catch (const simgrid::TimeoutException&) {
XBT_DEBUG("Failed to receive the answer to my 'Predecessor Alive' request");
pred_id_ = -1;
}
XBT_DEBUG("Sending a 'Get Predecessor' request to %d", ask_to);
try {
mailbox->put(message, 10, timeout);
- } catch (const simgrid::TimeoutError&) {
+ } catch (const simgrid::TimeoutException&) {
XBT_DEBUG("Failed to send the 'Get Predecessor' request to %d", ask_to);
delete message;
return predecessor_id;
answer->answer_id);
predecessor_id = answer->answer_id;
delete answer;
- } catch (const simgrid::TimeoutError&) {
+ } catch (const simgrid::TimeoutException&) {
XBT_DEBUG("Failed to receive the answer to my 'Get Predecessor' request");
delete static_cast<ChordMessage*>(data);
}
XBT_DEBUG("Sending a 'Find Successor' request to %d for id %d", ask_to, id);
try {
mailbox->put(message, 10, timeout);
- } catch (const simgrid::TimeoutError&) {
+ } catch (const simgrid::TimeoutException&) {
XBT_DEBUG("Failed to send the 'Find Successor' request to %d for id %d", ask_to, id_);
delete message;
return successor;
answer->request_id, id_, answer->answer_id);
successor = answer->answer_id;
delete answer;
- } catch (const simgrid::TimeoutError&) {
+ } catch (const simgrid::TimeoutException&) {
XBT_DEBUG("Failed to receive the answer to my 'Find Successor' request");
delete static_cast<ChordMessage*>(data);
}
simgrid::s4u::this_actor::parallel_execute(hosts, computation_amounts, communication_amounts,
10.0 /* timeout (in seconds)*/);
xbt_die("Woops, this did not timeout as expected... Please report that bug.");
- } catch (const simgrid::TimeoutError&) {
+ } catch (const simgrid::TimeoutException&) {
XBT_INFO("Caught the expected timeout exception.");
}
XBT_INFO("Send a message to %s", mailbox->get_cname());
mailbox->put(payload, comm_size, 10.0);
XBT_INFO("Send to %s completed", mailbox->get_cname());
- } catch (const simgrid::TimeoutError&) {
+ } catch (const simgrid::TimeoutException&) {
delete payload;
XBT_INFO("Mmh. Got timeouted while speaking to '%s'. Nevermind. Let's keep going!", mailbox->get_cname());
} catch (const simgrid::NetworkFailureException&) {
double* payload = new double(-1.0);
try {
mailbox->put(payload, 0, 1.0);
- } catch (const simgrid::TimeoutError&) {
+ } catch (const simgrid::TimeoutException&) {
delete payload;
XBT_INFO("Mmh. Got timeouted while speaking to '%s'. Nevermind. Let's keep going!", mailbox->get_cname());
} catch (const simgrid::NetworkFailureException&) {
};
/** Exception raised when a timeout elapsed */
-class TimeoutError : public Exception {
+class TimeoutException : public Exception {
public:
- TimeoutError(simgrid::xbt::ThrowPoint&& throwpoint, std::string&& message)
+ TimeoutException(simgrid::xbt::ThrowPoint&& throwpoint, std::string&& message)
: Exception(std::move(throwpoint), std::move(message))
{
}
};
+XBT_ATTRIB_DEPRECATED_v327("Please use simgrid::TimeoutException") typedef TimeoutException TimeoutError;
+
/** Exception raised when a host fails */
class HostFailureException : public Exception {
public:
case SIMIX_SRC_TIMEOUT:
simcall->issuer->exception_ = std::make_exception_ptr(
- simgrid::TimeoutError(XBT_THROW_POINT, "Communication timeouted because of the sender"));
+ simgrid::TimeoutException(XBT_THROW_POINT, "Communication timeouted because of the sender"));
break;
case SIMIX_DST_TIMEOUT:
simcall->issuer->exception_ = std::make_exception_ptr(
- simgrid::TimeoutError(XBT_THROW_POINT, "Communication timeouted because of the receiver"));
+ simgrid::TimeoutException(XBT_THROW_POINT, "Communication timeouted because of the receiver"));
break;
case SIMIX_SRC_HOST_FAILURE:
case SIMIX_TIMEOUT:
XBT_DEBUG("ExecImpl::finish(): execution timeouted");
- simcall->issuer->exception_ = std::make_exception_ptr(simgrid::TimeoutError(XBT_THROW_POINT, "Timeouted"));
+ simcall->issuer->exception_ = std::make_exception_ptr(simgrid::TimeoutException(XBT_THROW_POINT, "Timeouted"));
break;
default:
/* I am the receiver */
(*task_received)->set_not_used();
}
- } catch (const simgrid::TimeoutError&) {
+ } catch (const simgrid::TimeoutException&) {
status_ = MSG_TIMEOUT;
finished = true;
} catch (const simgrid::CancelException&) {
}
/* FIXME: these functions are not traceable */
- } catch (const simgrid::TimeoutError&) {
+ } catch (const simgrid::TimeoutException&) {
status_ = MSG_TIMEOUT;
} catch (const simgrid::CancelException&) {
status_ = MSG_TASK_CANCELED;
msg_error_t status = MSG_OK;
try {
finished_index = simcall_comm_testany(s_comms.data(), s_comms.size());
- } catch (const simgrid::TimeoutError& e) {
+ } catch (const simgrid::TimeoutException& e) {
finished_index = e.value;
status = MSG_TIMEOUT;
} catch (const simgrid::CancelException& e) {
msg_error_t status = MSG_OK;
try {
finished_index = simcall_comm_waitany(s_comms.data(), s_comms.size(), -1);
- } catch (const simgrid::TimeoutError& e) {
+ } catch (const simgrid::TimeoutException& e) {
finished_index = e.value;
status = MSG_TIMEOUT;
} catch (const simgrid::CancelException& e) {
XBT_DEBUG("Execution task '%s' finished", get_cname());
} catch (const HostFailureException&) {
status = MSG_HOST_FAILURE;
- } catch (const TimeoutError&) {
+ } catch (const TimeoutException&) {
status = MSG_TIMEOUT;
} catch (const CancelException&) {
status = MSG_TASK_CANCELED;
s4u::CommPtr s4u_comm = send_async(alias, nullptr, false);
comm = s4u_comm;
comm->wait_for(timeout);
- } catch (const simgrid::TimeoutError&) {
+ } catch (const simgrid::TimeoutException&) {
ret = MSG_TIMEOUT;
} catch (const simgrid::CancelException&) {
ret = MSG_HOST_FAILURE;
(*task)->set_not_used();
} catch (const simgrid::HostFailureException&) {
ret = MSG_HOST_FAILURE;
- } catch (const simgrid::TimeoutError&) {
+ } catch (const simgrid::TimeoutException&) {
ret = MSG_TIMEOUT;
} catch (const simgrid::CancelException&) {
ret = MSG_TASK_CANCELED;