/* 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. */
+#include <cstdlib>
+
+#include <atomic>
#include <exception>
+#include <string>
#include <typeinfo>
+#include <vector>
#include <memory>
#include <mutex>
namespace simgrid {
namespace xbt {
-WithContextException::~WithContextException() {}
+WithContextException::~WithContextException() = default;
void logException(
e_xbt_log_priority_t prio,
// an uncaught exception
static std::atomic_flag lock = ATOMIC_FLAG_INIT;
if (lock.test_and_set()) {
- XBT_ERROR("Multiple uncaught exceptions");
+ XBT_ERROR("Handling an exception raised an exception. Bailing out.");
std::abort();
}
}
}
-
-void xbt_set_terminate()
-{
- simgrid::xbt::installExceptionHandler();
-}