summaryrefslogtreecommitdiffstats
path: root/ocamldoc
diff options
context:
space:
mode:
authorAlain Frisch <alain@frisch.fr>2013-09-12 14:45:03 +0000
committerAlain Frisch <alain@frisch.fr>2013-09-12 14:45:03 +0000
commit884ca00fdfc1fe5f6165fbb847c6744a47fb59d2 (patch)
treebd64e49f3c3a449e41120b0e3508e120986ceab0 /ocamldoc
parent8660e346df9c4b9bb5db38d5c91689f8a6ad906c (diff)
Continue cleanup. driver/errors.ml is no longer needed.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/exception_registration@14120 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'ocamldoc')
-rw-r--r--ocamldoc/odoc_analyse.ml25
1 files changed, 9 insertions, 16 deletions
diff --git a/ocamldoc/odoc_analyse.ml b/ocamldoc/odoc_analyse.ml
index 7dd2e4456..98f73617d 100644
--- a/ocamldoc/odoc_analyse.ml
+++ b/ocamldoc/odoc_analyse.ml
@@ -100,23 +100,16 @@ module Ast_analyser = Odoc_ast.Analyser (Odoc_comments.Basic_info_retriever)
(** The module used to analyse the parse tree and typed tree of an interface file.*)
module Sig_analyser = Odoc_sig.Analyser (Odoc_comments.Basic_info_retriever)
-(** Handle an error. This is a partial copy of the compiler
- driver/error.ml file. We do this because there are
- some differences between the possibly raised exceptions
- in the bytecode (error.ml) and opt (opterros.ml) compilers
- and we don't want to take care of this. Besises, these
- differences only concern code generation (i believe).*)
+(** Handle an error. *)
+
let process_error exn =
- 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
+ match Location.error_of_exn exn with
+ | Some err ->
+ fprintf Format.err_formatter "@[%a@]@." Location.report_error err
+ | None ->
+ fprintf Format.err_formatter
+ "Compilation error(%s). Use the OCaml compiler to get more details.@."
+ (Printexc.to_string exn)
(** Process the given file, according to its extension. Return the Module.t created, if any.*)
let process_file ppf sourcefile =