diff options
Diffstat (limited to 'driver')
-rw-r--r-- | driver/errors.ml | 28 | ||||
-rw-r--r-- | driver/opterrors.ml | 6 |
2 files changed, 4 insertions, 30 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 diff --git a/driver/opterrors.ml b/driver/opterrors.ml index 94bf18453..d516707db 100644 --- a/driver/opterrors.ml +++ b/driver/opterrors.ml @@ -35,12 +35,6 @@ let report_error ppf exn = | Asmpackager.Error code -> Location.print_error_cur_file ppf; Asmpackager.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 |