mirror of
https://github.com/NixOS/nix
synced 2025-06-25 23:11:16 +02:00
forceAttrs: Show position info
This commit is contained in:
parent
96b695ccab
commit
27b44b8cf7
5 changed files with 23 additions and 14 deletions
|
@ -55,6 +55,14 @@ inline void EvalState::forceAttrs(Value & v)
|
|||
}
|
||||
|
||||
|
||||
inline void EvalState::forceAttrs(Value & v, const Pos & pos)
|
||||
{
|
||||
forceValue(v);
|
||||
if (v.type != tAttrs)
|
||||
throwTypeError("value is %1% while a set was expected, at %2%", v, pos);
|
||||
}
|
||||
|
||||
|
||||
inline void EvalState::forceList(Value & v)
|
||||
{
|
||||
forceValue(v);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue