diff options
Diffstat (limited to 'asmcomp')
-rw-r--r-- | asmcomp/asmgen.ml | 7 | ||||
-rw-r--r-- | asmcomp/asmlibrarian.ml | 7 | ||||
-rw-r--r-- | asmcomp/asmlink.ml | 7 | ||||
-rw-r--r-- | asmcomp/asmpackager.ml | 7 | ||||
-rw-r--r-- | asmcomp/compilenv.ml | 7 |
5 files changed, 35 insertions, 0 deletions
diff --git a/asmcomp/asmgen.ml b/asmcomp/asmgen.ml index 40f7dafbd..34283875c 100644 --- a/asmcomp/asmgen.ml +++ b/asmcomp/asmgen.ml @@ -140,3 +140,10 @@ let report_error ppf = function | Assembler_error file -> fprintf ppf "Assembler error, input left in file %a" Location.print_filename file + +let () = + Location.register_error_of_exn + (function + | Error err -> Some (Location.error_of_printer_file report_error err) + | _ -> None + ) diff --git a/asmcomp/asmlibrarian.ml b/asmcomp/asmlibrarian.ml index 140791f22..968e1de74 100644 --- a/asmcomp/asmlibrarian.ml +++ b/asmcomp/asmlibrarian.ml @@ -69,3 +69,10 @@ let report_error ppf = function fprintf ppf "Cannot find file %s" name | Archiver_error name -> fprintf ppf "Error while creating the library %s" name + +let () = + Location.register_error_of_exn + (function + | Error err -> Some (Location.error_of_printer_file report_error err) + | _ -> None + ) diff --git a/asmcomp/asmlink.ml b/asmcomp/asmlink.ml index f6a85a94c..30bb13f63 100644 --- a/asmcomp/asmlink.ml +++ b/asmcomp/asmlink.ml @@ -390,3 +390,10 @@ let report_error ppf = function Location.print_filename filename name Location.print_filename filename name + +let () = + Location.register_error_of_exn + (function + | Error err -> Some (Location.error_of_printer_file report_error err) + | _ -> None + ) diff --git a/asmcomp/asmpackager.ml b/asmcomp/asmpackager.ml index 1a4fe9027..a8fcfe789 100644 --- a/asmcomp/asmpackager.ml +++ b/asmcomp/asmpackager.ml @@ -204,3 +204,10 @@ let report_error ppf = function fprintf ppf "Error while assembling %s" file | Linking_error -> fprintf ppf "Error during partial linking" + +let () = + Location.register_error_of_exn + (function + | Error err -> Some (Location.error_of_printer_file report_error err) + | _ -> None + ) diff --git a/asmcomp/compilenv.ml b/asmcomp/compilenv.ml index 280b13127..48d6be7d4 100644 --- a/asmcomp/compilenv.ml +++ b/asmcomp/compilenv.ml @@ -245,3 +245,10 @@ let report_error ppf = function fprintf ppf "%a@ contains the description for unit\ @ %s when %s was expected" Location.print_filename filename name modname + +let () = + Location.register_error_of_exn + (function + | Error err -> Some (Location.error_of_printer_file report_error err) + | _ -> None + ) |