From 3fe28b6efb5bb44f4822f3182bc59dfe8c6671b4 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sat, 25 Aug 2018 13:33:55 +0200 Subject: [PATCH] Make HostFailureException compatible with the old xbt_ex mechanism 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 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/simgrid/Exception.hpp b/include/simgrid/Exception.hpp index 13cbc85f23..56eef781a8 100644 --- a/include/simgrid/Exception.hpp +++ b/include/simgrid/Exception.hpp @@ -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 */ -- 2.20.1