diff options
author | eldritch horrors <pennae@lix.systems> | 2024-03-08 09:19:15 +0100 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-03-09 10:17:26 -0700 |
commit | 992d99592f1022593e4df276e39e8f4f65822f74 (patch) | |
tree | 4d688284a84b4dea63c447d7283af0b30e201cf0 /src/libexpr/primops.cc | |
parent | 6b11c2cd7020869b796dc8e6904b358c9e41a23c (diff) |
`:quit` in the debugger should quit the whole program
(cherry picked from commit 2a8fe9a93837733e9dd9ed5c078734a35b203e14)
Change-Id: I71dadfef6b24d9272b206e9e2c408040559d8a1c
Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r-- | src/libexpr/primops.cc | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 86db527f6..30933e191 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -754,15 +754,6 @@ static RegisterPrimOp primop_break({ auto & dt = state.debugTraces.front(); state.runDebugRepl(&error, dt.env, dt.expr); - - if (state.debugQuit) { - // If the user elects to quit the repl, throw an exception. - throw Error(ErrorInfo{ - .level = lvlInfo, - .msg = HintFmt("quit the debugger"), - .pos = nullptr, - }); - } } // Return the value we were passed. @@ -873,7 +864,7 @@ static void prim_tryEval(EvalState & state, const PosIdx pos, Value * * args, Va /* increment state.trylevel, and decrement it when this function returns. */ MaintainCount trylevel(state.trylevel); - void (* savedDebugRepl)(ref<EvalState> es, const ValMap & extraEnv) = nullptr; + ReplExitStatus (* savedDebugRepl)(ref<EvalState> es, const ValMap & extraEnv) = nullptr; if (state.debugRepl && evalSettings.ignoreExceptionsDuringTry) { /* to prevent starting the repl from exceptions withing a tryEval, null it. */ |