diff options
Diffstat (limited to 'bytecomp')
-rw-r--r-- | bytecomp/bytelibrarian.ml | 7 | ||||
-rw-r--r-- | bytecomp/bytelink.ml | 7 | ||||
-rw-r--r-- | bytecomp/bytepackager.ml | 7 | ||||
-rw-r--r-- | bytecomp/symtable.ml | 7 |
4 files changed, 28 insertions, 0 deletions
diff --git a/bytecomp/bytelibrarian.ml b/bytecomp/bytelibrarian.ml index fdcb0d882..c63cf80ec 100644 --- a/bytecomp/bytelibrarian.ml +++ b/bytecomp/bytelibrarian.ml @@ -117,3 +117,10 @@ let report_error ppf = function | Not_an_object_file name -> fprintf ppf "The file %a is not a bytecode object file" Location.print_filename name + +let () = + Location.register_error_of_exn + (function + | Error err -> Some (Location.error_of_printer_file report_error err) + | _ -> None + ) diff --git a/bytecomp/bytelink.ml b/bytecomp/bytelink.ml index b1660e9a3..75db3533c 100644 --- a/bytecomp/bytelink.ml +++ b/bytecomp/bytelink.ml @@ -622,3 +622,10 @@ let report_error ppf = function | Not_compatible_32 -> fprintf ppf "Generated bytecode executable cannot be run\ \ on a 32-bit platform" + +let () = + Location.register_error_of_exn + (function + | Error err -> Some (Location.error_of_printer_file report_error err) + | _ -> None + ) diff --git a/bytecomp/bytepackager.ml b/bytecomp/bytepackager.ml index f548c771a..8ba2f5321 100644 --- a/bytecomp/bytepackager.ml +++ b/bytecomp/bytepackager.ml @@ -276,3 +276,10 @@ let report_error ppf = function Location.print_filename file name id | File_not_found file -> fprintf ppf "File %s not found" file + +let () = + Location.register_error_of_exn + (function + | Error err -> Some (Location.error_of_printer_file report_error err) + | _ -> None + ) diff --git a/bytecomp/symtable.ml b/bytecomp/symtable.ml index 412c1ab09..9c94c9046 100644 --- a/bytecomp/symtable.ml +++ b/bytecomp/symtable.ml @@ -372,3 +372,10 @@ let report_error ppf = function fprintf ppf "Cannot find or execute the runtime system %s" s | Uninitialized_global s -> fprintf ppf "The value of the global `%s' is not yet computed" s + +let () = + Location.register_error_of_exn + (function + | Error err -> Some (Location.error_of_printer_file report_error err) + | _ -> None + ) |