- 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_value<bool>("exception/cutpath")) {
- auto backtrace = with_context->resolve_backtrace();
- XBT_LOG(prio, " -> %s", backtrace.c_str());
+ // 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());