about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorFabian Schmitthenner <development@schmitthenner.eu>2015-11-28T01·24+0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2016-01-05T13·13+0100
commit39d1da7b51e6984a332a7eb68ae4048242b1adb8 (patch)
treef1ffdc3c284677e3e1206604ad9fab23772de0ee /src
parent0eb200e569affe89c8850ea993ae0f603f40f742 (diff)
Better error message
Also show types when nix cannot compare values of different types.
This is also more consistent since types are already shown when comparing values of the same not comparable type.
Diffstat (limited to 'src')
-rw-r--r--src/libexpr/primops.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index cf2d3d278f28..5a1f47b55e0d 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -248,7 +248,7 @@ struct CompareValues
     bool operator () (const Value * v1, const Value * v2) const
     {
         if (v1->type != v2->type)
-            throw EvalError("cannot compare values of different types");
+            throw EvalError(format("cannot compare %1% with %2%") % showType(*v1) % showType(*v2));
         switch (v1->type) {
             case tInt:
                 return v1->integer < v2->integer;