summaryrefslogtreecommitdiffstats
path: root/driver
diff options
context:
space:
mode:
Diffstat (limited to 'driver')
-rw-r--r--driver/errors.ml17
-rw-r--r--driver/main.ml2
-rw-r--r--driver/opterrors.ml1
3 files changed, 2 insertions, 18 deletions
diff --git a/driver/errors.ml b/driver/errors.ml
index 4f8a4eb3e..cb1a047ec 100644
--- a/driver/errors.ml
+++ b/driver/errors.ml
@@ -10,19 +10,4 @@
(* *)
(***********************************************************************)
-(* WARNING: if you change something in this file, you must look at
- opterrors.ml and ocamldoc/odoc_analyse.ml
- to see if you need to make the same changes there.
-*)
-
-open Format
-
-(* Report an error *)
-
-let report_error ppf exn =
- let report ppf x =
- match Location.error_of_exn x with
- | Some err -> Location.report_error ppf err
- | None -> fprintf ppf "@]"; raise x
- in
- fprintf ppf "@[%a@]@." report exn
+let report_error = Location.report_exception
diff --git a/driver/main.ml b/driver/main.ml
index 4ab251c7f..d038af75a 100644
--- a/driver/main.ml
+++ b/driver/main.ml
@@ -184,7 +184,7 @@ let main () =
end;
exit 0
with x ->
- Errors.report_error ppf x;
+ Location.report_exception ppf x;
exit 2
let _ = main ()
diff --git a/driver/opterrors.ml b/driver/opterrors.ml
index d516707db..68279bff6 100644
--- a/driver/opterrors.ml
+++ b/driver/opterrors.ml
@@ -40,5 +40,4 @@ let report_error ppf exn =
| Some err -> Location.report_error ppf err
| None -> fprintf ppf "@]"; raise x
in
-
fprintf ppf "@[%a@]@." report exn