Sfoglia il codice sorgente

add position and error message to decode_error.txt

Rudy Ges 5 mesi fa
parent
commit
dced7c8a16
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      src/typing/macroContext.ml

+ 1 - 0
src/typing/macroContext.ml

@@ -43,6 +43,7 @@ let safe_decode com v expected t p f =
 	let raise_decode_error s =
 		let path = [Dump.dump_path com.defines;"decoding_error"] in
 		let ch = Path.create_file false ".txt" [] path  in
+		Printf.fprintf ch "%s: %s\n" (TPrinting.Printer.s_pos p) s;
 		let errors = Interp.handle_decoding_error (output_string ch) v t in
 		List.iter (fun (s,i) -> Printf.fprintf ch "\nline %i: %s" i s) (List.rev errors);
 		close_out ch;