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

optinoal error; compiles

This commit is contained in:
Ben Burdette 2022-01-08 11:03:48 -07:00
parent c51b527c28
commit a963674d88
5 changed files with 42 additions and 37 deletions

View file

@ -917,19 +917,23 @@ void runRepl(
{
auto repl = std::make_unique<NixRepl>(evalState);
repl->debugError = debugError;
// repl->debugError = debugError;
repl->initEnv();
// tack on a final DebugTrace for the error position.
DebugTraceStacker ldts(
*evalState,
DebugTrace
{.pos = debugError->info().errPos,
.expr = expr,
.env = *repl->env,
.hint = debugError->info().msg
});
// auto dts = debugError ?
// std::unique_ptr<DebugTraceStacker>(
// // tack on a final DebugTrace for the error position.
// new DebugTraceStacker(
// *evalState,
// DebugTrace
// {.pos = debugError->info().errPos,
// .expr = expr,
// .env = *repl->env,
// .hint = debugError->info().msg
// })
// )
// : nullptr;
// add 'extra' vars.
std::set<std::string> names;