diff options
| author | Emilio Jesus Gallego Arias | 2019-03-03 16:49:30 +0100 |
|---|---|---|
| committer | Emilio Jesus Gallego Arias | 2019-07-07 00:57:28 +0200 |
| commit | 07abf9818a6b47bb2c2bd0a8201da9743a0c10b6 (patch) | |
| tree | 0325550fcf395bad3f4951259202f97db182fbaf /lib/cErrors.mli | |
| parent | ae7fc8bc74289bd8a1eca48c8ca8ecf923888285 (diff) | |
[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.
Diffstat (limited to 'lib/cErrors.mli')
| -rw-r--r-- | lib/cErrors.mli | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/cErrors.mli b/lib/cErrors.mli index 8580622095..100dcd0b22 100644 --- a/lib/cErrors.mli +++ b/lib/cErrors.mli @@ -86,3 +86,10 @@ val iprint_no_report : Exninfo.iexn -> Pp.t Typical example: [Sys.Break], [Assert_failure], [Anomaly] ... *) val noncritical : exn -> bool + +(** Register a printer for errors carrying additional information on + exceptions. This method is fragile and should be considered + deprecated *) +val register_additional_error_info + : (Exninfo.info -> (Pp.t option Loc.located) option) + -> unit |
