diff options
author | aspiwack <aspiwack@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2011-05-13 17:57:41 +0000 |
---|---|---|
committer | aspiwack <aspiwack@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2011-05-13 17:57:41 +0000 |
commit | edcf0d8b8bff399443ddf4cd436185c33bf59829 (patch) | |
tree | b95d6dd4ae5ccae0114b2fa27c00bcd89f445f78 /lib/errors.mli | |
parent | 1b906116b43f5975fef7bb6f4dfb9589cfe3d6ee (diff) |
A new mechanism to handle errors.
Instead of the monolitic Cerrors, I introduce a lightweight Errors module
whose error message can be expanded by module introducing exceptions.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14119 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib/errors.mli')
-rw-r--r-- | lib/errors.mli | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/errors.mli b/lib/errors.mli new file mode 100644 index 000000000..120634e60 --- /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 |