mirror of
https://github.com/NixOS/nix
synced 2025-06-27 16:51:15 +02:00
addTrace
This commit is contained in:
parent
e6f93b94fc
commit
4d1a4f0217
3 changed files with 59 additions and 44 deletions
|
@ -239,13 +239,13 @@ void prim_exec(EvalState & state, const Pos & pos, Value * * args, Value & v)
|
|||
try {
|
||||
parsed = state.parseExprFromString(output, pos.file);
|
||||
} catch (Error & e) {
|
||||
e.addPrefix(fmt("While parsing the output from '%1%', at %2%\n", program, pos));
|
||||
e.addTrace(pos, hintfmt("While parsing the output from '%1%'", program));
|
||||
throw;
|
||||
}
|
||||
try {
|
||||
state.eval(parsed, v);
|
||||
} catch (Error & e) {
|
||||
e.addPrefix(fmt("While evaluating the output from '%1%', at %2%\n", program, pos));
|
||||
e.addTrace(pos, hintfmt("While evaluating the output from '%1%'", program));
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue