diff options
author | Ben Burdette <bburdette@gmail.com> | 2020-11-09 17:04:52 -0700 |
---|---|---|
committer | Ben Burdette <bburdette@gmail.com> | 2020-11-09 17:04:52 -0700 |
commit | 6c2933a8d72f9328a2931a8166439bed96b80f24 (patch) | |
tree | cdb1ba903ef905edf40f56d4c9f2ad8a5bceb1db /src/libexpr | |
parent | 107c91f5fe6248548c292d28d0ad53c0de7ceeba (diff) |
add position
Diffstat (limited to 'src/libexpr')
-rw-r--r-- | src/libexpr/eval.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index e52e8dcf2..11f2e31ce 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -1370,11 +1370,11 @@ void EvalState::autoCallFunction(Bindings & args, Value & fun, Value & res) if (j != args.end()) { actualArgs->attrs->push_back(*j); } else if (!i.def) { - throwUndefinedVarError(R"(cannot auto-call a function that has an argument without a default value ('%1%') + throwUndefinedVarError(i.pos, R"(cannot auto-call a function that has an argument without a default value ('%1%') An 'auto-call' is when a nix expression is evaluated without any external arguments. If that nix expression is a function, and that function's arguments all have default values, then all is well. - But if the function arguments don't have default values, then evaluation fails. + But if the function arguments don't have default values, evaluation fails. The classic case for this error is evaluating a nix file with nix-build that expects to be evaluated by callPackage. # in 'callPackage' format: expression is a function that takes an argument 'stdenv'. |