- 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
+ auto* with_context = dynamic_cast<const simgrid::Exception*>(&exception);
+ if (with_context != nullptr) {
+ XBT_LOG(prio, "%s %s by %s/%d: %s", context, name.get(), 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, " -> %s", backtrace.c_str());
+ }
+ } else {