diff --git a/src/libexpr/eval-inline.hh b/src/libexpr/eval-inline.hh index 4abc485aa..8dee5ee46 100644 --- a/src/libexpr/eval-inline.hh +++ b/src/libexpr/eval-inline.hh @@ -8,9 +8,9 @@ namespace nix { -LocalNoInlineNoReturn(void throwEvalError(const FormatOrString & fs)) +LocalNoInlineNoReturn(void throwEvalError(const char * s, const Pos & pos)) { - throw EvalError(fs); + throw EvalError(format(s) % pos); } LocalNoInlineNoReturn(void throwTypeError(const char * s, const Value & v)) @@ -44,7 +44,7 @@ void EvalState::forceValue(Value & v, const Pos & pos) else if (v.type == tApp) callFunction(*v.app.left, *v.app.right, v, noPos); else if (v.type == tBlackhole) - throwEvalError(format("infinite recursion encountered, at %1%") % pos); + throwEvalError("infinite recursion encountered, at %1%", pos); } diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index ec02e61b0..74f88e498 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -358,11 +358,6 @@ LocalNoInlineNoReturn(void throwEvalError(const char * s, const string & s2)) throw EvalError(format(s) % s2); } -LocalNoInlineNoReturn(void throwEvalError(const char * s, const Pos & pos)) -{ - throw EvalError(format(s) % pos); -} - LocalNoInlineNoReturn(void throwEvalError(const char * s, const string & s2, const Pos & pos)) { throw EvalError(format(s) % s2 % pos);