about summary refs log tree commit diff
path: root/src/libexpr/eval.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-04-04T17·05+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-04-04T17·05+0200
commit96b695ccab4a4c8c4ef7f14ac261df43dcc00743 (patch)
tree3511cba77ca830dbe598ed207b79ce21afc74870 /src/libexpr/eval.cc
parentb62d36963c45ccaebb328fceaf0bb40f9c02a14b (diff)
forceList: Show position info
Diffstat (limited to 'src/libexpr/eval.cc')
-rw-r--r--src/libexpr/eval.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index 0be1e73491..b74170ecb1 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -294,11 +294,6 @@ LocalNoInlineNoReturn(void throwTypeError(const char * s, const string & s1))
     throw TypeError(format(s) % s1);
 }
 
-LocalNoInlineNoReturn(void throwTypeError(const char * s, const Value & v, const Pos & pos))
-{
-    throw TypeError(format(s) % showType(v) % pos);
-}
-
 LocalNoInlineNoReturn(void throwTypeError(const char * s, const string & s1, const string & s2))
 {
     throw TypeError(format(s) % s1 % s2);
@@ -1169,11 +1164,11 @@ bool EvalState::forceBool(Value & v)
 }
 
 
-void EvalState::forceFunction(Value & v)
+void EvalState::forceFunction(Value & v, const Pos & pos)
 {
     forceValue(v);
     if (v.type != tLambda && v.type != tPrimOp && v.type != tPrimOpApp)
-        throwTypeError("value is %1% while a function was expected", v);
+        throwTypeError("value is %1% while a function was expected, at %2%", v, pos);
 }