summaryrefslogtreecommitdiffstats
path: root/asmcomp/compilenv.ml
diff options
context:
space:
mode:
authorAlain Frisch <alain@frisch.fr>2013-09-12 15:50:47 +0000
committerAlain Frisch <alain@frisch.fr>2013-09-12 15:50:47 +0000
commitb92a3ca792b754b10d6c0b307d4167bcb7ed632f (patch)
tree0a34fa5a09ec0cda0a3cd108577c7158838cb7ae /asmcomp/compilenv.ml
parent884ca00fdfc1fe5f6165fbb847c6744a47fb59d2 (diff)
Continue.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/exception_registration@14122 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'asmcomp/compilenv.ml')
-rw-r--r--asmcomp/compilenv.ml7
1 files changed, 7 insertions, 0 deletions
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
+ )