/** Exception raised when a timeout elapsed */
class TimeoutError : public xbt_ex {
+public:
+ TimeoutError(simgrid::xbt::ThrowPoint throwpoint, std::string message) : xbt_ex(throwpoint, message)
+ {
+ category = timeout_error;
+ }
};
/** Exception raised when an host fails */
case SIMIX_TIMEOUT:
XBT_DEBUG("SIMIX_execution_finished: execution timeouted");
- SMX_EXCEPTION(simcall->issuer, timeout_error, 0, "Timeouted");
+ simcall->issuer->exception = std::make_exception_ptr(simgrid::TimeoutError(XBT_THROW_POINT, "Timeouted"));
break;
default:
break;
case SIMIX_SRC_TIMEOUT:
- SMX_EXCEPTION(simcall->issuer, timeout_error, 0, "Communication timeouted because of sender");
+ simcall->issuer->exception = std::make_exception_ptr(
+ simgrid::TimeoutError(XBT_THROW_POINT, "Communication timeouted because of the sender"));
break;
case SIMIX_DST_TIMEOUT:
- SMX_EXCEPTION(simcall->issuer, timeout_error, 0, "Communication timeouted because of receiver");
+ simcall->issuer->exception = std::make_exception_ptr(
+ simgrid::TimeoutError(XBT_THROW_POINT, "Communication timeouted because of the receiver"));
break;
case SIMIX_SRC_HOST_FAILURE: