aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr
diff options
context:
space:
mode:
authorValentin Gagarin <valentin.gagarin@tweag.io>2022-12-12 22:03:00 +0100
committerGitHub <noreply@github.com>2022-12-12 22:03:00 +0100
commitedb54c62e6c66f3d26642c024d92bd20b30abf85 (patch)
tree9665c2ae40669cb58263ca4d8be90e5605e47263 /src/libexpr
parente408af82ab71d870f854efe417abf1400567e1f1 (diff)
parent8618c6cc75e19ed658649bd806b218de954ea3bc (diff)
Merge pull request #7334 from chaoflow/stack-trace-order
Show stack trace above error message with innermost first
Diffstat (limited to 'src/libexpr')
-rw-r--r--src/libexpr/eval.cc2
-rw-r--r--src/libexpr/flake/flake.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index 6955aacbf..0d9226d3b 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -1660,7 +1660,7 @@ void EvalState::callFunction(Value & fun, size_t nrArgs, Value * * args, Value &
(lambda.name
? concatStrings("'", symbols[lambda.name], "'")
: "anonymous lambda"));
- addErrorTrace(e, pos, "from call site%s", "");
+ addErrorTrace(e, pos, "while evaluating call site%s", "");
}
throw;
}
diff --git a/src/libexpr/flake/flake.cc b/src/libexpr/flake/flake.cc
index 6b5d6f6b3..6344fb253 100644
--- a/src/libexpr/flake/flake.cc
+++ b/src/libexpr/flake/flake.cc
@@ -143,7 +143,7 @@ static FlakeInput parseFlakeInput(EvalState & state,
} catch (Error & e) {
e.addTrace(
state.positions[attr.pos],
- hintfmt("in flake attribute '%s'", state.symbols[attr.name]));
+ hintfmt("while evaluating flake attribute '%s'", state.symbols[attr.name]));
throw;
}
}
@@ -152,7 +152,7 @@ static FlakeInput parseFlakeInput(EvalState & state,
try {
input.ref = FlakeRef::fromAttrs(attrs);
} catch (Error & e) {
- e.addTrace(state.positions[pos], hintfmt("in flake input"));
+ e.addTrace(state.positions[pos], hintfmt("while evaluating flake input"));
throw;
}
else {