aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/nixexpr.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-10-23 16:45:19 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-10-23 16:45:19 +0000
commitdd300fb48dd2048d056a5f25dda7d4c1f5515d46 (patch)
tree4f1bb45f6971517b3553ab930e9ec3cc045bcec9 /src/libexpr/nixexpr.cc
parent1d694eef4ce022a99a3fb552804a1f26f686cc55 (diff)
* Some better error messages.
Diffstat (limited to 'src/libexpr/nixexpr.cc')
-rw-r--r--src/libexpr/nixexpr.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libexpr/nixexpr.cc b/src/libexpr/nixexpr.cc
index cb006d147..a6cde127c 100644
--- a/src/libexpr/nixexpr.cc
+++ b/src/libexpr/nixexpr.cc
@@ -54,7 +54,7 @@ void queryAllAttrs(Expr e, ATermMap & attrs, bool withPos)
{
ATermList bnds;
if (!matchAttrs(e, bnds))
- throw TypeError("attribute set expected");
+ throw TypeError(format("value is %1% while an attribute set was expected") % showType(e));
for (ATermIterator i(bnds); i; ++i) {
ATerm name;
@@ -77,7 +77,7 @@ Expr queryAttr(Expr e, const string & name, ATerm & pos)
{
ATermList bnds;
if (!matchAttrs(e, bnds))
- throw TypeError("attribute set expected");
+ throw TypeError(format("value is %1% while an attribute set was expected") % showType(e));
for (ATermIterator i(bnds); i; ++i) {
ATerm name2, pos2;