formatting

This commit is contained in:
Ben Burdette 2022-03-16 12:09:47 -06:00
parent 3dfab6e534
commit 88a54108eb
3 changed files with 14 additions and 14 deletions

View file

@ -128,7 +128,7 @@ ref<EvalState> 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)) {

View file

@ -114,10 +114,10 @@ public:
RootValue vCallFlake = nullptr;
RootValue vImportedDrvToDerivation = nullptr;
/* Debugger */
bool debugStop;
bool debugQuit;
std::list<DebugTrace> debugTraces;
void debug_throw(Error e);
private:

View file

@ -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];
}
}
});