diff options
author | Pamplemousse <xav.maso@gmail.com> | 2021-06-29 14:28:43 -0700 |
---|---|---|
committer | Pamplemousse <xav.maso@gmail.com> | 2021-07-01 11:09:31 -0700 |
commit | 4a7a8b87cd0dd383f1059fe7903c4b001314f58d (patch) | |
tree | 3fc2a6ec3bc343f790803abcb1c5bb516d283dfe /src/libexpr/eval.cc | |
parent | decc14d4b7fbe1664ae609563003c883d4e426a8 (diff) |
Prefer to throw specific errors
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
Diffstat (limited to 'src/libexpr/eval.cc')
-rw-r--r-- | src/libexpr/eval.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index ef9f8efca..657e4e4cf 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -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); |