}
};
+/** Exception raised when a storage fails */
+class StorageFailureException : public xbt_ex {
+public:
+ StorageFailureException(simgrid::xbt::ThrowPoint throwpoint, std::string message)
+ : xbt_ex(std::move(throwpoint), std::move(message))
+ {
+ category = io_error;
+ }
+};
+
/** Exception raised when something got canceled before completion */
class CancelException : public xbt_ex {
public:
XBT_VERB("This exec %p is canceled", this);
if (surf_action_ != nullptr)
surf_action_->cancel();
+ state_ = SIMIX_CANCELED;
}
double IoImpl::get_remaining()
/* do nothing, synchro done */
break;
case SIMIX_FAILED:
- SMX_EXCEPTION(simcall->issuer, io_error, 0, "IO failed");
+ simcall->issuer->exception_ =
+ std::make_exception_ptr(simgrid::StorageFailureException(XBT_THROW_POINT, "Storage failed"));
break;
case SIMIX_CANCELED:
simcall->issuer->exception_ =