Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Define proper exceptions subclasses.
[simgrid.git] / include / simgrid / Exception.hpp
index 685f36d..8c1e0f7 100644 (file)
@@ -56,6 +56,19 @@ public:
 /** Create a ThrowPoint with (__FILE__, __LINE__, __func__) */
 #define XBT_THROW_POINT                                                                                                \
   ::simgrid::xbt::ThrowPoint(__FILE__, __LINE__, __func__, simgrid::xbt::Backtrace(), xbt_procname(), xbt_getpid())
+
+class XBT_PUBLIC ImpossibleError : public std::logic_error {
+public:
+  explicit ImpossibleError(const std::string& arg) : std::logic_error(arg) {}
+  ~ImpossibleError();
+};
+
+class XBT_PUBLIC UnimplementedError : public std::logic_error {
+public:
+  explicit UnimplementedError(const std::string& arg) : std::logic_error(arg) {}
+  ~UnimplementedError();
+};
+
 } // namespace xbt
 
 /** Ancestor class of all SimGrid exception */