- 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());
+ 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());