aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/error.cc
diff options
context:
space:
mode:
authorFlorian Friesdorf <florian@ternaris.com>2022-11-22 12:46:55 +0000
committerFlorian Friesdorf <florian@ternaris.com>2022-12-12 18:41:00 +0000
commit173dcb0af9249487c2d9ad5de7218fcf203873bd (patch)
treee756a897798fc7468034ff502ac40ba3248d5509 /src/libutil/error.cc
parente408af82ab71d870f854efe417abf1400567e1f1 (diff)
Don't reverse stack trace when showing
When debugging nix expressions the outermost trace tends to be more useful than the innermost. It is therefore printed last to save developers from scrolling.
Diffstat (limited to 'src/libutil/error.cc')
-rw-r--r--src/libutil/error.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/error.cc b/src/libutil/error.cc
index 9172f67a6..9cac6ac91 100644
--- a/src/libutil/error.cc
+++ b/src/libutil/error.cc
@@ -287,7 +287,7 @@ std::ostream & showErrorInfo(std::ostream & out, const ErrorInfo & einfo, bool s
// traces
if (showTrace && !einfo.traces.empty()) {
- for (auto iter = einfo.traces.rbegin(); iter != einfo.traces.rend(); ++iter) {
+ for (auto iter = einfo.traces.begin(); iter != einfo.traces.end(); ++iter) {
oss << "\n" << "… " << iter->hint.str() << "\n";
if (iter->pos.has_value() && (*iter->pos)) {