diff options
author | Alain Frisch <alain@frisch.fr> | 2013-09-12 14:34:13 +0000 |
---|---|---|
committer | Alain Frisch <alain@frisch.fr> | 2013-09-12 14:34:13 +0000 |
commit | 8660e346df9c4b9bb5db38d5c91689f8a6ad906c (patch) | |
tree | 6d829ecb9eba696a42d81dd44bd97117cba2bdd9 /driver/errors.ml | |
parent | bc9e5b0a5103724e6610a56898dd1b81528bec70 (diff) |
Continue.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/exception_registration@14119 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'driver/errors.ml')
-rw-r--r-- | driver/errors.ml | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/driver/errors.ml b/driver/errors.ml index 011067adb..4f8a4eb3e 100644 --- a/driver/errors.ml +++ b/driver/errors.ml @@ -20,29 +20,9 @@ open Format (* Report an error *) let report_error ppf exn = - let report ppf = function - | Symtable.Error code -> - Location.print_error_cur_file ppf; - Symtable.report_error ppf code - | Bytelink.Error code -> - Location.print_error_cur_file ppf; - Bytelink.report_error ppf code - | Bytelibrarian.Error code -> - Location.print_error_cur_file ppf; - Bytelibrarian.report_error ppf code - | Bytepackager.Error code -> - Location.print_error_cur_file ppf; - Bytepackager.report_error ppf code - | 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 "@]"; raise x + 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 |