1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 06:31:14 +02:00

trying debugThrow

This commit is contained in:
Ben Burdette 2022-05-06 08:47:21 -06:00
parent 99d69ac23f
commit 2c9fafdc9e
7 changed files with 115 additions and 207 deletions

View file

@ -85,7 +85,7 @@ void printValueAsJSON(EvalState & state, bool strict,
.errPos = state.positions[v.determinePos(pos)]
});
e.addTrace(state.positions[pos], hintfmt("message for the trace"));
state.debugLastTrace(e);
state.debugThrowLastTrace(e);
throw e;
}
}
@ -101,8 +101,7 @@ void ExternalValueBase::printValueAsJSON(EvalState & state, bool strict,
JSONPlaceholder & out, PathSet & context) const
{
auto e = TypeError("cannot convert %1% to JSON", showType());
state.debugLastTrace(e);
throw e;
state.debugThrowLastTrace(e);
}