aboutsummaryrefslogtreecommitdiff
path: root/lib/cErrors.mli
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2020-02-25 10:26:02 +0100
committerPierre-Marie Pédrot2020-02-25 10:26:02 +0100
commitff3755c88f813f1a0e40e08128521cce81e38273 (patch)
tree7a43b69d3c3fd4dc66c79cd743858ac4bbcab1fc /lib/cErrors.mli
parenta9deb354d00b9a402a63648d1cadf4c2c36bbdd1 (diff)
parent6e5f8099d1877197e6ecda3fd4edac8d48228661 (diff)
Merge PR #11498: [exn] Forbid raising in exn printers, make them return Pp.t option
Reviewed-by: ppedrot
Diffstat (limited to 'lib/cErrors.mli')
-rw-r--r--lib/cErrors.mli13
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/cErrors.mli b/lib/cErrors.mli
index 02eaf6bd0b..1660a00244 100644
--- a/lib/cErrors.mli
+++ b/lib/cErrors.mli
@@ -46,19 +46,14 @@ exception Timeout
recent first) until a handle deals with it.
Handles signal that they don't deal with some exception
- by raising [Unhandled].
+ by returning None. Raising any other exception is
+ forbidden and will result in an anomaly.
- Handles can raise exceptions themselves, in which
- case, the exception is passed to the handles which
- were registered before.
-
- The exception that are considered anomalies should not be
+ Exceptions that are considered anomalies should not be
handled by registered handlers.
*)
-exception Unhandled
-
-val register_handler : (exn -> Pp.t) -> unit
+val register_handler : (exn -> Pp.t option) -> unit
(** The standard exception printer *)
val print : exn -> Pp.t