/** Create a ThrowPoint with (__FILE__, __LINE__, __func__) */
#define XBT_THROW_POINT \
- ::simgrid::xbt::ThrowPoint(__FILE__, __LINE__, __func__, std::move(simgrid::xbt::Backtrace()), xbt_procname(), \
- xbt_getpid())
+ ::simgrid::xbt::ThrowPoint(__FILE__, __LINE__, __func__, simgrid::xbt::Backtrace(), xbt_procname(), xbt_getpid())
} // namespace xbt
/** Ancestor class of all SimGrid exception */
}
};
-/** Exception raised when a communication fails because of the network */
+/** Exception raised when a communication fails because of the network or because of the remote host */
class NetworkFailureException : public xbt_ex {
public:
NetworkFailureException(simgrid::xbt::ThrowPoint throwpoint, std::string message)
}
};
+/** 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:
+ CancelException(simgrid::xbt::ThrowPoint throwpoint, std::string message)
+ : xbt_ex(std::move(throwpoint), std::move(message))
+ {
+ category = cancel_error;
+ }
};
} // namespace simgrid