mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02:00
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.
This commit is contained in:
parent
0eb200e569
commit
39d1da7b51
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue