aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/eval-error.cc
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-03-08 09:47:09 +0100
committereldritch horrors <pennae@lix.systems>2024-03-09 10:17:26 -0700
commita9b813cc3bcf89f03de0db96fc2e88d1c83b8303 (patch)
treeb64221dbd3b3461c57e90289cd0539bf96c860dd /src/libexpr/eval-error.cc
parentf2e11ddce1ef76d9f653e0c32659d46ff7d6cafa (diff)
Merge pull request #10066 from 9999years/print-all-frames
Do not skip any stack frames when `--show-trace` is given (cherry picked from commit 0b47783d0a879875d558f0b56e49584f25ceb2d0) Change-Id: Ia0f18266dbcf97543110110c655c219c7a3e3270
Diffstat (limited to 'src/libexpr/eval-error.cc')
-rw-r--r--src/libexpr/eval-error.cc14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/libexpr/eval-error.cc b/src/libexpr/eval-error.cc
index f4cdeec5c..8db03610b 100644
--- a/src/libexpr/eval-error.cc
+++ b/src/libexpr/eval-error.cc
@@ -28,15 +28,7 @@ template<class T>
EvalErrorBuilder<T> & EvalErrorBuilder<T>::withTrace(PosIdx pos, const std::string_view text)
{
error.err.traces.push_front(
- Trace{.pos = error.state.positions[pos], .hint = HintFmt(std::string(text)), .frame = false});
- return *this;
-}
-
-template<class T>
-EvalErrorBuilder<T> & EvalErrorBuilder<T>::withFrameTrace(PosIdx pos, const std::string_view text)
-{
- error.err.traces.push_front(
- Trace{.pos = error.state.positions[pos], .hint = HintFmt(std::string(text)), .frame = true});
+ Trace{.pos = error.state.positions[pos], .hint = HintFmt(std::string(text))});
return *this;
}
@@ -63,9 +55,9 @@ EvalErrorBuilder<T> & EvalErrorBuilder<T>::withFrame(const Env & env, const Expr
}
template<class T>
-EvalErrorBuilder<T> & EvalErrorBuilder<T>::addTrace(PosIdx pos, HintFmt hint, bool frame)
+EvalErrorBuilder<T> & EvalErrorBuilder<T>::addTrace(PosIdx pos, HintFmt hint)
{
- error.addTrace(error.state.positions[pos], hint, frame);
+ error.addTrace(error.state.positions[pos], hint);
return *this;
}