aboutsummaryrefslogtreecommitdiff
path: root/lib/errors.mli
diff options
context:
space:
mode:
authorletouzey2013-03-17 22:00:33 +0000
committerletouzey2013-03-17 22:00:33 +0000
commit70d582a7e191420661506a0e71fa022d1160626e (patch)
tree963ecb59798131ba9250f01354443b46316a42f8 /lib/errors.mli
parent60902645ba29f967883fdfe8aa46ef6f4a80ac7d (diff)
Checker: simplify a bit its exception handler
We use Errors.print for anomalies and other uncaught exceptions in the checker: this should print the same message, it is shorter this way, and we avoid using Errors.is_anomaly. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16310 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib/errors.mli')
-rw-r--r--lib/errors.mli9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/errors.mli b/lib/errors.mli
index a7f4ef0cdf..7e296e45e7 100644
--- a/lib/errors.mli
+++ b/lib/errors.mli
@@ -29,7 +29,9 @@ val anomaly : ?loc:Loc.t -> ?label:string -> std_ppcmds -> 'a
label identifying the anomaly. *)
val is_anomaly : exn -> bool
-(** Check whether a given exception is an anomaly. *)
+(** Check whether a given exception is an anomaly.
+ This is mostly provided for compatibility. Please avoid doing specific
+ tricks with anomalies thanks to it. See rather [noncritical] below. *)
exception UserError of string * std_ppcmds
val error : string -> 'a
@@ -74,16 +76,13 @@ val register_handler : (exn -> Pp.std_ppcmds) -> unit
(** The standard exception printer *)
val print : exn -> Pp.std_ppcmds
-(** Exception printer dedicated to anomalies. *)
-val print_anomaly : exn -> Pp.std_ppcmds
-
(** Same as [print], except that the "Please report" part of an anomaly
isn't printed (used in Ltac debugging). *)
val print_no_report : exn -> Pp.std_ppcmds
(** Critical exceptions shouldn't be catched and ignored by mistake
by inner functions during a [vernacinterp]. They should be handled
- only at the very end of interp, to be displayed to the user.
+ only in [Toplevel.do_vernac] (or Ideslave), to be displayed to the user.
Typical example: [Sys.Break], [Assert_failure], [Anomaly] ...
*)
val noncritical : exn -> bool