- auto name = simgrid::xbt::demangle(typeid(exception).name());
-
- auto* with_context = dynamic_cast<const simgrid::xbt::WithContextException*>(&exception);
- if (with_context != nullptr)
- XBT_LOG(prio, "%s %s by %s/%d: %s",
- context, name.get(),
- with_context->processName().c_str(), with_context->pid(),
- exception.what());
- else
- XBT_LOG(prio, "%s %s: %s", context, name.get(), exception.what());
-
- // Do we have a backtrace?
- if (with_context != nullptr && not simgrid::config::get_config<bool>("exception/cutpath")) {
- auto backtrace = simgrid::xbt::resolveBacktrace(
- with_context->backtrace().data(), with_context->backtrace().size());
- for (std::string const& s : backtrace)
- XBT_LOG(prio, " -> %s", s.c_str());
+ std::string name = boost::core::demangle(typeid(exception).name());
+
+ auto* with_context = dynamic_cast<const simgrid::Exception*>(&exception);
+ if (with_context != nullptr) {
+ XBT_LOG(prio, "%s %s by %s/%d: %s", context, name.c_str(), with_context->throw_point().procname_.c_str(),
+ with_context->throw_point().pid_, exception.what());
+ // Do we have a backtrace?
+ if (not simgrid::config::get_value<bool>("exception/cutpath")) {
+ auto backtrace = with_context->resolve_backtrace();
+ XBT_LOG(prio, "Backtrace:\n%s", backtrace.c_str());
+ }
+ } else {
+ XBT_LOG(prio, "%s %s: %s", context, name.c_str(), exception.what());