mirror of
https://github.com/NixOS/nix.git
synced 2025-11-20 17:29:36 +01:00
Add a ugly hack to delay errors in getFields
This commit is contained in:
parent
28c1f8800b
commit
2324ee4891
1 changed files with 9 additions and 2 deletions
|
|
@ -1316,8 +1316,15 @@ std::vector<Attr> EvalState::getFields(Value & attrs, const Pos & pos)
|
||||||
everythingCached = false;
|
everythingCached = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} catch (Error &) {
|
} catch (EvalError & e) {
|
||||||
everythingCached = false;
|
// XXX: Ugly hack to hide the error
|
||||||
|
newValue->mkThunk(
|
||||||
|
&baseEnv,
|
||||||
|
new ExprApp(
|
||||||
|
parseExprFromString("throw", "/"),
|
||||||
|
new ExprString(symbols.create(e.what()))
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (everythingCached) return res;
|
if (everythingCached) return res;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue