about summary refs log tree commit diff
path: root/src/libexpr/eval.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2016-08-29T15·56+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-08-29T17·37+0200
commitc42d1acfeb42febb2815a3b76f24b9fc88d50ba8 (patch)
tree82022e5a8f5e6f500a59d67ddc89a4a17e4eed2d /src/libexpr/eval.cc
parent26d92017d3b36cff940dcb7d1611c42232edb81a (diff)
forceBool(): 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 22396865f095..64f3874db614 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -1378,11 +1378,11 @@ NixFloat EvalState::forceFloat(Value & v, const Pos & pos)
 }
 
 
-bool EvalState::forceBool(Value & v)
+bool EvalState::forceBool(Value & v, const Pos & pos)
 {
     forceValue(v);
     if (v.type != tBool)
-        throwTypeError("value is %1% while a Boolean was expected", v);
+        throwTypeError("value is %1% while a Boolean was expected, at %2%", v, pos);
     return v.boolean;
 }