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-04T16·58+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-04-04T16·59+0200
commitb62d36963c45ccaebb328fceaf0bb40f9c02a14b (patch)
treed33902351ffed1c44fffb4acdc31938626da2795 /src/libexpr/eval.cc
parentc28de6d96e7bfea834a44deac5217d4696fa8d86 (diff)
forceInt: Show position info
Diffstat (limited to 'src/libexpr/eval.cc')
-rw-r--r--src/libexpr/eval.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index 3a2a84916e06..0be1e73491e9 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -1151,11 +1151,11 @@ void EvalState::strictForceValue(Value & v)
 }
 
 
-NixInt EvalState::forceInt(Value & v)
+NixInt EvalState::forceInt(Value & v, const Pos & pos)
 {
     forceValue(v);
     if (v.type != tInt)
-        throwTypeError("value is %1% while an integer was expected", v);
+        throwTypeError("value is %1% while an integer was expected, at %2%", v, pos);
     return v.integer;
 }