summaryrefslogtreecommitdiff
path: root/src/urweb.grm
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2011-01-16 14:16:09 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2011-01-16 14:16:09 -0500
commit74b0ef332b5fded92071970487c2e8289848257a (patch)
tree3bc6e56adbdaf785069a3877d2061fd3932038bb /src/urweb.grm
parenta3513efa961d390754d2b0ec38287cb0c0148f97 (diff)
Error message when FOREIGN KEY listts have different lengths
Diffstat (limited to 'src/urweb.grm')
-rw-r--r--src/urweb.grm7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/urweb.grm b/src/urweb.grm
index 5803f445..37bddef7 100644
--- a/src/urweb.grm
+++ b/src/urweb.grm
@@ -589,6 +589,13 @@ cst : UNIQUE tnames (let
end)
(EVar (["Basis"], "mat_nil", Infer), loc)
(#1 tnames :: #2 tnames, #1 tnames' :: #2 tnames')
+ handle ListPair.UnequalLengths =>
+ (ErrorMsg.errorAt loc ("Unequal foreign key list lengths ("
+ ^ Int.toString (1 + length (#2 tnames))
+ ^ " vs. "
+ ^ Int.toString (1 + length (#2 tnames'))
+ ^ ")");
+ (EVar (["Basis"], "mat_nil", Infer), loc))
fun findMode mode =
let