1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 07:31:15 +02:00

forceInt: Show position info

This commit is contained in:
Eelco Dolstra 2014-04-04 18:58:15 +02:00
parent c28de6d96e
commit b62d36963c
3 changed files with 11 additions and 11 deletions

View file

@ -1151,11 +1151,11 @@ void EvalState::strictForceValue(Value & v)
}
NixInt EvalState::forceInt(Value & v)
NixInt EvalState::forceInt(Value & v, const Pos & pos)
{
forceValue(v);
if (v.type != tInt)
throwTypeError("value is %1% while an integer was expected", v);
throwTypeError("value is %1% while an integer was expected, at %2%", v, pos);
return v.integer;
}