Nicolas Cannasse 18 years ago
parent
commit
a2d87cfa63
2 changed files with 6 additions and 1 deletions
  1. 3 0
      doc/CHANGES.txt
  2. 3 1
      parser.ml

+ 3 - 0
doc/CHANGES.txt

@@ -1,3 +1,6 @@
+2007-??-??: 1.14
+	fixed no error when invalid "catch" expression
+
 2007-05-18: 1.13
 	fixed bug with local variable masking package in catch type
 	fixed "Not_found" when enum params differs

+ 3 - 1
parser.ml

@@ -619,7 +619,9 @@ and parse_catch etry = parser
 		match s with parser
 		| [< '(DblDot,_); t = parse_type_path; '(PClose,_); s >] ->
 			(try
-				(name,t,expr s)
+				match s with parser
+				| [< e = expr >] ->	(name,t,expr s)
+				| [< >] -> serror()
 			with
 				Display e -> display (ETry (etry,[name,t,e]),p))
 		| [< '(_,p) >] -> error Missing_type p