Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
woops, plug a memleak
[simgrid.git] / src / kernel / context / Context.hpp
index 20ee29e..9a6ace7 100644 (file)
@@ -85,10 +85,11 @@ public:
      */
   public:
     StopRequest() = default;
-    explicit StopRequest(std::string msg) : msg_(msg) {}
+    explicit StopRequest(std::string msg) : msg_(std::string("Actor killed (") + msg + std::string(").")) {}
+    const char* what() const noexcept { return msg_.c_str(); }
 
   private:
-    std::string msg_;
+    std::string msg_ = std::string("Actor killed.");
   };
 };