Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
tiny doc improvement
[simgrid.git] / include / simgrid / Exception.hpp
index db16dd9..0e2ce75 100644 (file)
@@ -134,7 +134,7 @@ public:
   }
 };
 
-/** 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)
@@ -144,8 +144,24 @@ public:
   }
 };
 
+/** 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