1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 16:51:15 +02:00

quit repl from step mode

This commit is contained in:
Ben Burdette 2022-02-15 09:49:25 -07:00
parent e761bf0601
commit c9bc3735f6
4 changed files with 26 additions and 7 deletions

View file

@ -718,6 +718,15 @@ static RegisterPrimOp primop_break({
auto &dt = state.debugTraces.front();
debuggerHook(&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 from debugger"),
.errPos = pos,
});
}
// returning the value we were passed.
v = *args[0];
}