+/** The location of where an exception has been throwed
+ *
+ * This is a tuple (__FILE__, __LINE__, __func__) and can be created with
+ * @ref XBT_THROW_POINT.
+ *
+ * @ingroup XBT_ex
+ */
+struct ThrowPoint {
+ ThrowPoint() {}
+ ThrowPoint(const char* file, int line, const char* function) :
+ file(file), line(line), function(function) {}
+ const char* file = nullptr;
+ int line = 0;
+ const char* function = nullptr;
+};
+
+/** Create a ThrowPoint with (__FILE__, __LINE__, __func__) */
+#define XBT_THROW_POINT ::simgrid::xbt::ThrowPoint(__FILE__, __LINE__, __func__)
+
+/** A base class for exceptions with context
+ *
+ * This is a base class for exceptions which store additional contextual
+ * infomations about them: backtrace, throw point, simulated process name
+ * and PID, etc.
+ *
+ * You are not expected to inherit from it. Instead of you use should
+ * @ref XBT_THROW an exception which will throw a subclass of your original
+ * exception with those additional features.
+ *
+ * However, you can try `dynamic_cast` an exception to this type in order to
+ * get contextual information about the exception.
+ */