Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Don't leave an empty catch block.
[simgrid.git] / src / xbt / exception.cpp
index a87ac86..6d9272f 100644 (file)
@@ -105,6 +105,7 @@ void log_exception(e_xbt_log_priority_t prio, const char* context, std::exceptio
   }
   catch (...) {
     // Don't log exceptions we got when trying to log exception
+    XBT_LOG(prio, "Ignoring exception caught while while trying to log an exception!");
   }
 }
 
@@ -145,7 +146,7 @@ static void handler()
     std::abort();
   }
 
-  catch (simgrid::kernel::context::ForcefulKillException& e) {
+  catch (const simgrid::ForcefulKillException&) {
     XBT_ERROR("Received a ForcefulKillException at the top-level exception handler. Maybe a Java->C++ call that is not "
               "protected "
               "in a try/catch?");
@@ -172,15 +173,6 @@ void install_exception_handler()
     previous_terminate_handler = std::set_terminate(handler);
   });
 }
-// deprecated
-void logException(e_xbt_log_priority_t priority, const char* context, std::exception const& exception)
-{
-  log_exception(priority, context, exception);
-}
-void installExceptionHandler()
-{
-  install_exception_handler();
-}
 
 } // namespace xbt
 } // namespace simgrid