aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/eval.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-04-04 18:58:15 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-04-04 18:59:29 +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 3a2a84916..0be1e7349 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;
}