0
0
Fork 0
forked from lix-project/lix

libexpr: only runDebugRepl with EvalErrors

only break ever passed a non-EvalError, and even that was erroneous.

Change-Id: I03bb74d7fc449d9bab1e7d8e774389d2381ab457
This commit is contained in:
eldritch horrors 2024-11-27 02:09:08 +01:00
parent 7af000ddff
commit e635db77e3
3 changed files with 3 additions and 3 deletions

View file

@ -639,7 +639,7 @@ public:
} }
}; };
void EvalState::runDebugRepl(const Error * error, const Env & env, const Expr & expr) void EvalState::runDebugRepl(const EvalError * error, const Env & env, const Expr & expr)
{ {
// Make sure we have a debugger to run and we're not already in a debugger. // Make sure we have a debugger to run and we're not already in a debugger.
if (!debugRepl || inDebugger) if (!debugRepl || inDebugger)

View file

@ -220,7 +220,7 @@ public:
return std::shared_ptr<const StaticEnv>();; return std::shared_ptr<const StaticEnv>();;
} }
void runDebugRepl(const Error * error, const Env & env, const Expr & expr); void runDebugRepl(const EvalError * error, const Env & env, const Expr & expr);
template<class T, typename... Args> template<class T, typename... Args>
[[nodiscard, gnu::noinline]] [[nodiscard, gnu::noinline]]

View file

@ -567,7 +567,7 @@ static void prim_genericClosure(EvalState & state, const PosIdx pos, Value * * a
static void prim_break(EvalState & state, const PosIdx pos, Value * * args, Value & v) static void prim_break(EvalState & state, const PosIdx pos, Value * * args, Value & v)
{ {
if (state.debugRepl && !state.debugTraces.empty()) { if (state.debugRepl && !state.debugTraces.empty()) {
auto error = Error(ErrorInfo { auto error = EvalError(state, ErrorInfo {
.level = lvlInfo, .level = lvlInfo,
.msg = HintFmt("breakpoint reached"), .msg = HintFmt("breakpoint reached"),
.pos = state.positions[pos], .pos = state.positions[pos],