mirror of
https://github.com/NixOS/nix
synced 2025-06-24 22:11:15 +02:00
Merge pull request #10305 from hercules-ci/addErrorContext-is-great
Always print addErrorContext
This commit is contained in:
commit
de101417eb
9 changed files with 96 additions and 20 deletions
|
@ -826,7 +826,7 @@ static void prim_addErrorContext(EvalState & state, const PosIdx pos, Value * *
|
|||
auto message = state.coerceToString(pos, *args[0], context,
|
||||
"while evaluating the error message passed to builtins.addErrorContext",
|
||||
false, false).toOwned();
|
||||
e.addTrace(nullptr, HintFmt(message));
|
||||
e.addTrace(nullptr, HintFmt(message), TracePrint::Always);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
@ -834,6 +834,8 @@ static void prim_addErrorContext(EvalState & state, const PosIdx pos, Value * *
|
|||
static RegisterPrimOp primop_addErrorContext(PrimOp {
|
||||
.name = "__addErrorContext",
|
||||
.arity = 2,
|
||||
// The normal trace item is redundant
|
||||
.addTrace = false,
|
||||
.fun = prim_addErrorContext,
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue