Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Misc. cosmetic changes.
[simgrid.git] / src / simgrid / Exception.cpp
index ed0a7e9..d250e73 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2018-2019. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2018-2021. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -13,8 +13,16 @@ namespace simgrid {
 // Defining it here ensures that the exceptions are defined only in libsimgrid, but not in libsimgrid-java.
 // Doing otherwise naturally breaks things (at least on freebsd with clang).
 
-Exception::~Exception()                         = default;
-ForcefulKillException::~ForcefulKillException() = default;
+Exception::~Exception()                             = default;
+TimeoutException::~TimeoutException()               = default;
+HostFailureException::~HostFailureException()       = default;
+NetworkFailureException::~NetworkFailureException() = default;
+StorageFailureException::~StorageFailureException() = default;
+VmFailureException::~VmFailureException()           = default;
+CancelException::~CancelException()                 = default;
+TracingError::~TracingError()                       = default;
+ParseError::~ParseError()                           = default;
+ForcefulKillException::~ForcefulKillException()     = default;
 
 void ForcefulKillException::do_throw()
 {
@@ -27,8 +35,8 @@ bool ForcefulKillException::try_n_catch(const std::function<void()>& try_block)
   try {
     try_block();
     res = true;
-  } catch (ForcefulKillException const&) {
-    XBT_DEBUG("Caught a ForcefulKillException");
+  } catch (ForcefulKillException const& e) {
+    XBT_DEBUG("Caught a ForcefulKillException: %s", e.what());
     res = false;
   }
   return res;