summaryrefslogtreecommitdiffstats
path: root/ocamldoc/odoc_analyse.ml
diff options
context:
space:
mode:
authorAlain Frisch <alain@frisch.fr>2013-09-12 14:34:13 +0000
committerAlain Frisch <alain@frisch.fr>2013-09-12 14:34:13 +0000
commit8660e346df9c4b9bb5db38d5c91689f8a6ad906c (patch)
tree6d829ecb9eba696a42d81dd44bd97117cba2bdd9 /ocamldoc/odoc_analyse.ml
parentbc9e5b0a5103724e6610a56898dd1b81528bec70 (diff)
Continue.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/exception_registration@14119 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'ocamldoc/odoc_analyse.ml')
-rw-r--r--ocamldoc/odoc_analyse.ml23
1 files changed, 8 insertions, 15 deletions
diff --git a/ocamldoc/odoc_analyse.ml b/ocamldoc/odoc_analyse.ml
index 48a0262b9..7dd2e4456 100644
--- a/ocamldoc/odoc_analyse.ml
+++ b/ocamldoc/odoc_analyse.ml
@@ -107,21 +107,14 @@ module Sig_analyser = Odoc_sig.Analyser (Odoc_comments.Basic_info_retriever)
and we don't want to take care of this. Besises, these
differences only concern code generation (i believe).*)
let process_error exn =
- let report ppf = function
- | Sys_error msg ->
- Location.print_error_cur_file ppf;
- fprintf ppf "I/O error: %s" msg
- | Warnings.Errors (n) ->
- Location.print_error_cur_file ppf;
- fprintf ppf "Some fatal warnings were triggered (%d occurrences)" n
- | x ->
- match Location.error_of_exn x with
- | Some err -> Location.report_error ppf err
- | None ->
- fprintf ppf "@]";
- fprintf ppf
- "Compilation error(%s). Use the OCaml compiler to get more details."
- (Printexc.to_string x)
+ let report ppf x =
+ match Location.error_of_exn x with
+ | Some err -> Location.report_error ppf err
+ | None ->
+ fprintf ppf "@]";
+ fprintf ppf
+ "Compilation error(%s). Use the OCaml compiler to get more details."
+ (Printexc.to_string x)
in
Format.fprintf Format.err_formatter "@[%a@]@." report exn