aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/urweb.grm
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2011-02-17 14:18:18 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2011-02-17 14:18:18 -0500
commit94a29d801a6cf86291a8c5bbf88802f3d2b4338a (patch)
treefc2f8ff71c017b462187c7d8879003845cd1c2c6 /src/urweb.grm
parentf45895094211495b2aec63541b97e61b71abf289 (diff)
More information in error message about select of field from unbound table
Diffstat (limited to 'src/urweb.grm')
-rw-r--r--src/urweb.grm8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/urweb.grm b/src/urweb.grm
index bed80c98..40cfd2de 100644
--- a/src/urweb.grm
+++ b/src/urweb.grm
@@ -58,6 +58,12 @@ fun eqTnames ((c1, _), (c2, _)) =
| (CName x1, CName x2) => x1 = x2
| _ => false
+fun nameString (c, _) =
+ case c of
+ CName s => s
+ | CVar (_, x) => x
+ | _ => "?"
+
fun amend_select loc (si, (count, tabs, exps)) =
case si of
Field (tx, fx) =>
@@ -74,7 +80,7 @@ fun amend_select loc (si, (count, tabs, exps)) =
if found then
()
else
- ErrorMsg.errorAt loc "Select of field from unbound table";
+ ErrorMsg.errorAt loc ("Select of field " ^ nameString fx ^ " from unbound table " ^ nameString tx);
(count, tabs, exps)
end