Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make HostFailureException compatible with the old xbt_ex mechanism
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 25 Aug 2018 11:33:55 +0000 (13:33 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 25 Aug 2018 11:33:59 +0000 (13:33 +0200)
At least hopefully. In fact, when I try to use it, I fail to catch
HostFailureException as if they were xbt_ex exceptions, and I don't
know why.

include/simgrid/Exception.hpp

index 13cbc85..56eef78 100644 (file)
@@ -114,6 +114,11 @@ class TimeoutError : public xbt_ex {
 
 /** Exception raised when an host fails */
 class HostFailureException : public xbt_ex {
+public:
+  HostFailureException(simgrid::xbt::ThrowPoint throwpoint, const char* message) : xbt_ex(throwpoint, message)
+  {
+    category = host_error;
+  }
 };
 
 /** Exception raised when a communication fails because of the network */