Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Revert "Derive custom exception from std::exception."
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 29 Sep 2017 20:39:56 +0000 (22:39 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Fri, 29 Sep 2017 20:44:40 +0000 (22:44 +0200)
This reverts commit 7198a3162eaae82fa2ec5c612d5ae22e243055d7.

Make it impossible for user code to catch a StopRequest with a
try {} catch (std::exception).

Sonar will be whining but I don't care.

src/kernel/context/Context.hpp

index 090e7f4..89b3833 100644 (file)
@@ -6,7 +6,6 @@
 #ifndef SIMGRID_KERNEL_CONTEXT_CONTEXT_HPP
 #define SIMGRID_KERNEL_CONTEXT_CONTEXT_HPP
 
-#include <exception>
 #include <functional>
 #include <memory>
 #include <unordered_map>
@@ -81,7 +80,7 @@ namespace context {
     void_pfn_smxprocess_t cleanup_func_ = nullptr;
     smx_actor_t process_ = nullptr;
   public:
-    class StopRequest : public std::exception {
+    class StopRequest {
     };
     bool iwannadie;