diff options
author | Adam Chlipala <adamc@hcoop.net> | 2010-03-16 16:17:02 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2010-03-16 16:17:02 -0400 |
commit | 9a25a26d4c2e1e86df39e770c84a505bf43ceb97 (patch) | |
tree | 6a1012ed6bc009f4ba6860041f8213ef045678d0 | |
parent | 147060e49808e92b1ae5c0c9f967fecc75627c5c (diff) |
More informative tag mismatch error message
-rw-r--r-- | src/urweb.grm | 6 | ||||
-rw-r--r-- | tests/mismatch.ur | 3 | ||||
-rw-r--r-- | tests/mismatch.urp | 1 | ||||
-rw-r--r-- | tests/mismatch.urs | 1 |
4 files changed, 10 insertions, 1 deletions
diff --git a/src/urweb.grm b/src/urweb.grm index a6af8aa3..4738f7f3 100644 --- a/src/urweb.grm +++ b/src/urweb.grm @@ -1342,7 +1342,11 @@ xmlOne : NOTAGS (EApp ((EVar (["Basis"], "cdata", Infer) (if ErrorMsg.anyErrors () then () else - ErrorMsg.errorAt pos "Begin and end tags don't match."; + ErrorMsg.errorAt pos ("Begin tag <" + ^ #1 (#1 tag) + ^ "> and end tag </" + ^ et + ^ "> don't match."); (EWild, pos)) end) | LBRACE eexp RBRACE (eexp) diff --git a/tests/mismatch.ur b/tests/mismatch.ur new file mode 100644 index 00000000..e18e373d --- /dev/null +++ b/tests/mismatch.ur @@ -0,0 +1,3 @@ +fun main () = return <xml><body> + <b>Wowza!</i> +</body></xml> diff --git a/tests/mismatch.urp b/tests/mismatch.urp new file mode 100644 index 00000000..65f340b7 --- /dev/null +++ b/tests/mismatch.urp @@ -0,0 +1 @@ +mismatch diff --git a/tests/mismatch.urs b/tests/mismatch.urs new file mode 100644 index 00000000..6ac44e0b --- /dev/null +++ b/tests/mismatch.urs @@ -0,0 +1 @@ +val main : unit -> transaction page |