about summary refs log tree commit diff
path: root/src/libexpr/parser.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-07-19T15·36+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-07-19T15·36+0000
commit4f3725b167cc0080c570a814e28c6181ef5c7f52 (patch)
tree0e3bc97c8e207cdb0de3403a0430909debe5c043 /src/libexpr/parser.cc
parente10b830251af37951109113d88ddf203ae95645c (diff)
* Better error messages (especially wrt types).
Diffstat (limited to 'src/libexpr/parser.cc')
-rw-r--r--src/libexpr/parser.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libexpr/parser.cc b/src/libexpr/parser.cc
index 241a437345fc..5c2c85cd73af 100644
--- a/src/libexpr/parser.cc
+++ b/src/libexpr/parser.cc
@@ -103,7 +103,7 @@ static void checkAttrs(ATermMap & names, ATermList bnds)
         ATerm pos;
         if (!matchBind(*i, name, e, pos)) abort(); /* can't happen */
         if (names.get(name))
-            throw Error(format("duplicate attribute `%1%' at %2%")
+            throw EvalError(format("duplicate attribute `%1%' at %2%")
                 % aterm2String(name) % showPos(pos));
         names.set(name, name);
     }
@@ -123,7 +123,7 @@ static void checkAttrSets(ATerm e)
                 !matchDefFormal(*i, name, deflt))
                 abort();
             if (names.get(name))
-                throw Error(format("duplicate formal function argument `%1%' at %2%")
+                throw EvalError(format("duplicate formal function argument `%1%' at %2%")
                     % aterm2String(name) % showPos(pos));
             names.set(name, name);
         }
@@ -168,12 +168,12 @@ static Expr parse(EvalState & state,
     int res = yyparse(scanner, &data);
     yylex_destroy(scanner);
     
-    if (res) throw Error(data.error);
+    if (res) throw EvalError(data.error);
 
     try {
         checkVarDefs(state.primOps, data.result);
     } catch (Error & e) {
-        throw Error(format("%1%, in `%2%'") % e.msg() % path);
+        throw EvalError(format("%1%, in `%2%'") % e.msg() % path);
     }
     
     checkAttrSets(data.result);