From 88a54108ebcdbeb1432d9afe5363557c25f94cfa Mon Sep 17 00:00:00 2001 From: Ben Burdette Date: Wed, 16 Mar 2022 12:09:47 -0600 Subject: [PATCH] formatting --- src/libcmd/command.cc | 2 +- src/libexpr/eval.hh | 2 +- src/libexpr/primops.cc | 24 ++++++++++++------------ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/libcmd/command.cc b/src/libcmd/command.cc index 18aa82577..209c455fc 100644 --- a/src/libcmd/command.cc +++ b/src/libcmd/command.cc @@ -128,7 +128,7 @@ ref EvalCommand::getEvalState() else { auto iter = evalState->debugTraces.begin(); - if (iter != evalState->debugTraces.end()) { + if (iter != evalState->debugTraces.end()) { std::cout << "\n" << "… " << iter->hint.str() << "\n"; if (iter->pos.has_value() && (*iter->pos)) { diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh index 5f4556053..64c3dfac0 100644 --- a/src/libexpr/eval.hh +++ b/src/libexpr/eval.hh @@ -114,10 +114,10 @@ public: RootValue vCallFlake = nullptr; RootValue vImportedDrvToDerivation = nullptr; + /* Debugger */ bool debugStop; bool debugQuit; std::list debugTraces; - void debug_throw(Error e); private: diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 4908482cf..9a26bae71 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -715,20 +715,20 @@ static RegisterPrimOp primop_break({ }); if (debuggerHook && !state.debugTraces.empty()) { - auto &dt = state.debugTraces.front(); - debuggerHook(&error, dt.env, dt.expr); + 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, - }); - } + 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 = noPos, + }); + } - // returning the value we were passed. - v = *args[0]; + // returning the value we were passed. + v = *args[0]; } } });