// We manage C++ exception ourselves
catch (const std::exception& e) {
log_exception(xbt_log_priority_critical, "Uncaught exception", e);
- show_backtrace(bt);
- std::abort();
}
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?");
- show_backtrace(bt);
}
// We don't know how to manage other exceptions
catch (...) {
// If there was another handler let's delegate to it
- if (previous_terminate_handler)
+ if (previous_terminate_handler) {
previous_terminate_handler();
- else {
- XBT_ERROR("Unknown uncaught exception");
- show_backtrace(bt);
- std::abort();
+ XBT_ERROR("Unexpected return from delegated terminate handler");
}
+ XBT_ERROR("Unknown uncaught exception");
}
- XBT_INFO("BAM");
+ show_backtrace(bt);
+ std::abort();
}
void install_exception_handler()