mirror of
https://github.com/NixOS/nix
synced 2025-06-27 00:11:17 +02:00
optinoal error; compiles
This commit is contained in:
parent
c51b527c28
commit
a963674d88
5 changed files with 42 additions and 37 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue