# HG changeset patch # User Adam Chlipala # Date 1297970298 18000 # Node ID 7f6ac9f33d4dabdca67fba32f99e370920482079 # Parent bd6c90f5a4289854d1c14e1c245c1ddd4609f6dd More information in error message about select of field from unbound table diff -r bd6c90f5a428 -r 7f6ac9f33d4d src/urweb.grm --- a/src/urweb.grm Thu Feb 10 08:46:46 2011 -0500 +++ b/src/urweb.grm Thu Feb 17 14:18:18 2011 -0500 @@ -58,6 +58,12 @@ | (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 @@ 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