mirror of
https://github.com/NixOS/nix
synced 2025-06-26 15:51:15 +02:00
Merge pull request #4967 from Pamplemousse/specific_errors
Prefer to throw specific errors
This commit is contained in:
commit
f9d72855ae
4 changed files with 6 additions and 6 deletions
|
@ -920,7 +920,7 @@ void EvalState::evalFile(const Path & path_, Value & v, bool mustBeTrivial)
|
|||
// computation.
|
||||
if (mustBeTrivial &&
|
||||
!(dynamic_cast<ExprAttrs *>(e)))
|
||||
throw Error("file '%s' must be an attribute set", path);
|
||||
throw EvalError("file '%s' must be an attribute set", path);
|
||||
eval(e, v);
|
||||
} catch (Error & e) {
|
||||
addErrorTrace(e, "while evaluating the file '%1%':", path2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue