Explorar o código

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 %!s(int64=8) %!d(string=hai) anos
pai
achega
5283e013fa
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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