# HG changeset patch # User Adam Chlipala # Date 1295205369 18000 # Node ID af501150678a9155a92bc08cf59b24ba01d86978 # Parent c57414e393210d4059359dce2d0453a9db8b8253 Error message when FOREIGN KEY listts have different lengths diff -r c57414e39321 -r af501150678a src/urweb.grm --- a/src/urweb.grm Sun Jan 16 12:06:38 2011 -0500 +++ b/src/urweb.grm Sun Jan 16 14:16:09 2011 -0500 @@ -589,6 +589,13 @@ 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