diff options
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 |