summaryrefslogtreecommitdiffstats
path: root/bytecomp/symtable.ml
diff options
context:
space:
mode:
Diffstat (limited to 'bytecomp/symtable.ml')
-rw-r--r--bytecomp/symtable.ml7
1 files changed, 7 insertions, 0 deletions
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
+ )