From 07abf9818a6b47bb2c2bd0a8201da9743a0c10b6 Mon Sep 17 00:00:00 2001 From: Emilio Jesus Gallego Arias Date: Sun, 3 Mar 2019 16:49:30 +0100 Subject: [error] Remove special error printing pre-processing We remove the special error printing pre-processing in favor of just calling the standard printers. Error printing has been a bit complex for a while due to an incomplete migration to a new printing scheme based on registering exception printers; this PR should alleviate that by completing the registration approach. After this cleanup, it should not be ever necessary for normal functions to worry a lot about catching errors and re-raising them, unless they have some very special needs. This change also allows to consolidate the `explainErr` and `himsg` modules into one, removing the need to export the error printing functions. Ideally we would make the contents of `himsg` more localized, but this can be done in a gradual way. --- stm/stm.ml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'stm') diff --git a/stm/stm.ml b/stm/stm.ml index ceb62582cd..c5dd367a81 100644 --- a/stm/stm.ml +++ b/stm/stm.ml @@ -116,13 +116,12 @@ let call = get let call_process_error_once = let processed : unit Exninfo.t = Exninfo.make () in - fun (_, info as ei) -> + fun (e, info) -> match Exninfo.get info processed with - | Some _ -> ei + | Some _ -> e, info | None -> - let e, info = ExplainErr.process_vernac_interp_error ei in - let info = Exninfo.add info processed () in - e, info + let info = Exninfo.add info processed () in + e, info end -- cgit v1.2.3