Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' into 'master'
[simgrid.git] / include / simgrid / Exception.hpp
index f09b566..a030f0b 100644 (file)
@@ -61,19 +61,19 @@ public:
 class XBT_PUBLIC ImpossibleError : public std::logic_error {
 public:
   explicit ImpossibleError(const std::string& arg) : std::logic_error(arg) {}
-  ~ImpossibleError();
+  ~ImpossibleError() override;
 };
 
 class XBT_PUBLIC InitializationError : public std::logic_error {
 public:
   explicit InitializationError(const std::string& arg) : std::logic_error(arg) {}
-  ~InitializationError();
+  ~InitializationError() override;
 };
 
 class XBT_PUBLIC UnimplementedError : public std::logic_error {
 public:
   explicit UnimplementedError(const std::string& arg) : std::logic_error(arg) {}
-  ~UnimplementedError();
+  ~UnimplementedError() override;
 };
 
 } // namespace xbt
@@ -87,12 +87,12 @@ public:
   }
   Exception(const Exception&)     = default;
   Exception(Exception&&) noexcept = default;
-  ~Exception(); // DO NOT define it here -- see Exception.cpp for a rationale
+  ~Exception() override; // DO NOT define it here -- see Exception.cpp for a rationale
 
   /** Return the information about where the exception was thrown */
   xbt::ThrowPoint const& throw_point() const { return throwpoint_; }
 
-  std::string const resolve_backtrace() const { return throwpoint_.backtrace_.resolve(); }
+  std::string resolve_backtrace() const { return throwpoint_.backtrace_.resolve(); }
 
   /** Allow to carry a value (used by waitall/waitany) */
   int value = 0;
@@ -110,7 +110,7 @@ public:
   }
   TimeoutException(const TimeoutException&)     = default;
   TimeoutException(TimeoutException&&) noexcept = default;
-  ~TimeoutException();
+  ~TimeoutException() override;
 };
 
 XBT_ATTRIB_DEPRECATED_v328("Please use simgrid::TimeoutException") typedef TimeoutException TimeoutError;
@@ -124,7 +124,7 @@ public:
   }
   HostFailureException(const HostFailureException&)     = default;
   HostFailureException(HostFailureException&&) noexcept = default;
-  ~HostFailureException();
+  ~HostFailureException() override;
 };
 
 /** Exception raised when a communication fails because of the network or because of the remote host */
@@ -136,7 +136,7 @@ public:
   }
   NetworkFailureException(const NetworkFailureException&)     = default;
   NetworkFailureException(NetworkFailureException&&) noexcept = default;
-  ~NetworkFailureException();
+  ~NetworkFailureException() override;
 };
 
 /** Exception raised when a storage fails */
@@ -148,7 +148,7 @@ public:
   }
   StorageFailureException(const StorageFailureException&)     = default;
   StorageFailureException(StorageFailureException&&) noexcept = default;
-  ~StorageFailureException();
+  ~StorageFailureException() override;
 };
 
 /** Exception raised when a VM fails */
@@ -160,7 +160,7 @@ public:
   }
   VmFailureException(const VmFailureException&)     = default;
   VmFailureException(VmFailureException&&) noexcept = default;
-  ~VmFailureException();
+  ~VmFailureException() override;
 };
 
 /** Exception raised when something got canceled before completion */
@@ -172,7 +172,7 @@ public:
   }
   CancelException(const CancelException&)     = default;
   CancelException(CancelException&&) noexcept = default;
-  ~CancelException();
+  ~CancelException() override;
 };
 
 /** Exception raised when something is going wrong during the simulation tracing */
@@ -184,7 +184,7 @@ public:
   }
   TracingError(const TracingError&)     = default;
   TracingError(TracingError&&) noexcept = default;
-  ~TracingError();
+  ~TracingError() override;
 };
 
 /** Exception raised when something is going wrong during the parsing of XML files */
@@ -194,10 +194,9 @@ public:
       : Exception(XBT_THROW_POINT, xbt::string_printf("Parse error at %s:%d: %s", file.c_str(), line, msg.c_str()))
   {
   }
-  ParseError(const std::string& msg) : Exception(XBT_THROW_POINT, xbt::string_printf("Parse error: %s", msg.c_str())) {}
   ParseError(const ParseError&)     = default;
   ParseError(ParseError&&) noexcept = default;
-  ~ParseError();
+  ~ParseError() override;
 };
 
 class XBT_PUBLIC ForcefulKillException {
@@ -216,7 +215,7 @@ class XBT_PUBLIC ForcefulKillException {
    *   simgrid::s4u::this_actor::execute(100000);
    * } catch (simgrid::kernel::context::ForcefulKillException& e) { // oops, my host just turned off
    *   free(malloc);
-   *   throw; // I shall never survive on an host that was switched off
+   *   throw; // I shall never survive on a host that was switched off
    * }
    * @endverbatim
    */