forceValueDeep: Add to error prefix

This commit is contained in:
Eelco Dolstra 2015-03-06 15:10:12 +01:00
parent 5badc8f975
commit 17c71334e1

View file

@ -1226,8 +1226,13 @@ void EvalState::forceValueDeep(Value & v)
forceValue(v); forceValue(v);
if (v.type == tAttrs) { if (v.type == tAttrs) {
foreach (Bindings::iterator, i, *v.attrs) for (auto & i : *v.attrs)
recurse(*i->value); try {
recurse(*i.value);
} catch (Error & e) {
addErrorPrefix(e, "while evaluating the attribute %1% at %2%:\n", i.name, *i.pos);
throw;
}
} }
else if (v.type == tList) { else if (v.type == tList) {