mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-11 00:36:20 +02:00
throwEvalError form 3
This commit is contained in:
parent
989a4181a8
commit
ed74eaa07f
1 changed files with 8 additions and 3 deletions
|
@ -694,12 +694,17 @@ LocalNoInlineNoReturn(void throwEvalError(const char * s, const string & s2, con
|
|||
throw error;
|
||||
}
|
||||
|
||||
LocalNoInlineNoReturn(void throwEvalError(const Pos & pos, const char * s, const string & s2, const string & s3))
|
||||
LocalNoInlineNoReturn(void throwEvalError(const Pos & pos, const char * s, const string & s2, const string & s3, valmap * env))
|
||||
{
|
||||
throw EvalError({
|
||||
auto delenv = std::unique_ptr<valmap>(env);
|
||||
auto error = EvalError({
|
||||
.msg = hintfmt(s, s2, s3),
|
||||
.errPos = pos
|
||||
});
|
||||
|
||||
if (debuggerHook)
|
||||
debuggerHook(error, *env);
|
||||
throw error;
|
||||
}
|
||||
|
||||
LocalNoInlineNoReturn(void throwEvalError(const Pos & p1, const char * s, const Symbol & sym, const Pos & p2))
|
||||
|
@ -1855,7 +1860,7 @@ string EvalState::forceStringNoCtx(Value & v, const Pos & pos)
|
|||
if (v.string.context) {
|
||||
if (pos)
|
||||
throwEvalError(pos, "the string '%1%' is not allowed to refer to a store path (such as '%2%')",
|
||||
v.string.s, v.string.context[0]);
|
||||
v.string.s, v.string.context[0], map1("value", &v));
|
||||
else
|
||||
throwEvalError("the string '%1%' is not allowed to refer to a store path (such as '%2%')",
|
||||
v.string.s, v.string.context[0], map1("value", &v));
|
||||
|
|
Loading…
Reference in a new issue