Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make the future simgrid::*Exception inherit of legacy xbt_ex
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 25 Aug 2018 11:11:10 +0000 (13:11 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 25 Aug 2018 11:23:42 +0000 (13:23 +0200)
This should ease the transition path for our users

include/simgrid/Exception.hpp

index 454e593..13cbc85 100644 (file)
@@ -73,22 +73,6 @@ private:
   xbt::ThrowPoint throwpoint_;
 };
 
-/** Exception raised when a timeout elapsed */
-class timeout_error : public simgrid::Exception {
-};
-
-/** Exception raised when an host fails */
-class host_failure : public simgrid::Exception {
-};
-
-/** Exception raised when a communication fails because of the network */
-class network_failure : public simgrid::Exception {
-};
-
-/** Exception raised when something got canceled before completion */
-class canceled_error : public simgrid::Exception {
-};
-
 } // namespace simgrid
 
 /** A legacy exception
@@ -122,4 +106,23 @@ public:
   int value = 0;
 };
 
+namespace simgrid {
+
+/** Exception raised when a timeout elapsed */
+class TimeoutError : public xbt_ex {
+};
+
+/** Exception raised when an host fails */
+class HostFailureException : public xbt_ex {
+};
+
+/** Exception raised when a communication fails because of the network */
+class NetworkFailureException : public xbt_ex {
+};
+
+/** Exception raised when something got canceled before completion */
+class CancelException : public xbt_ex {
+};
+} // namespace simgrid
+
 #endif