- public std::runtime_error,
- public simgrid::xbt::WithContextException {
-public:
- xbt_ex() : std::runtime_error("") {}
- xbt_ex(const char* message) : std::runtime_error(message) {}
- ~xbt_ex() override;
+ std::runtime_error,
+ simgrid::xbt::WithContextException {
+
+ xbt_ex() :
+ std::runtime_error("")
+ {}
+
+ /**
+ *
+ * @param throwpoint Throw point (use XBT_THROW_POINT)
+ * @param message Exception message
+ */
+ xbt_ex(simgrid::xbt::ThrowPoint throwpoint, const char* message) :
+ std::runtime_error(message),
+ simgrid::xbt::WithContextException(throwpoint, simgrid::xbt::backtrace())
+ {}
+
+ virtual ~xbt_ex() = default;
+
+ /** Category (what went wrong) */
+ xbt_errcat_t category = unknown_error;
+
+ /** Why did it went wrong */
+ int value = 0;