Browse Source

Make malformed source file error more clear and use given file for error position rather than `p` which can be anything (closes #6339)

Dan Korostelev 8 năm trước cách đây
mục cha
commit
5283e013fa
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/typing/typeload.ml

+ 1 - 1
src/typing/typeload.ml

@@ -248,7 +248,7 @@ let parse_file_from_lexbuf com file p lexbuf =
 	with
 		| Sedlexing.MalFormed ->
 			t();
-			error "Malformed file" p
+			error "Malformed file. Source files must be encoded with UTF-8." {pfile = file; pmin = 0; pmax = 0}
 		| e ->
 			t();
 			raise e