aboutsummaryrefslogtreecommitdiff
path: root/lib/errors.mli
diff options
context:
space:
mode:
Diffstat (limited to 'lib/errors.mli')
-rw-r--r--lib/errors.mli27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/errors.mli b/lib/errors.mli
new file mode 100644
index 0000000000..120634e60d
--- /dev/null
+++ b/lib/errors.mli
@@ -0,0 +1,27 @@
+(***********************************************************************)
+(* v * The Coq Proof Assistant / The Coq Development Team *)
+(* <O___,, * INRIA-Rocquencourt & LRI-CNRS-Orsay *)
+(* \VV/ *************************************************************)
+(* // * This file is distributed under the terms of the *)
+(* * GNU Lesser General Public License Version 2.1 *)
+(***********************************************************************)
+
+(** This modules implements basic manipulations of errors for use
+ throughout Coq's code. *)
+
+(** [register_handler h] registers [h] as a handler.
+ When an expression is printed with [print e], it
+ goes through all registered handles (the most
+ recent first) until a handle deals with it.
+
+ Handles signal that they don't deal with some exception
+ by raisine [Unhandled].
+
+ Handles can raise exceptions themselves, in which
+ case, the exception is passed to the handles which
+ were registered before. *)
+exception Unhandled
+
+val register_handler : (exn -> Pp.std_ppcmds) -> unit
+
+val print : exn -> Pp.std_ppcmds