mirror of
https://github.com/NixOS/nix
synced 2025-06-26 03:21:16 +02:00
Prefer to throw specific errors
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
This commit is contained in:
parent
decc14d4b7
commit
4a7a8b87cd
4 changed files with 6 additions and 6 deletions
|
@ -908,7 +908,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