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 years ago
parent
commit
5283e013fa
1 changed files with 1 additions and 1 deletions
  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