aboutsummaryrefslogtreecommitdiff
path: root/proofs
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2020-03-19 12:07:27 +0100
committerPierre-Marie Pédrot2020-03-19 12:07:27 +0100
commitb69b87ce35b09b164929974b85b815d259185f18 (patch)
treeff0a3cebda0c7a60728caa7b7eb4beb209e1bf37 /proofs
parenta1315d78a5b3c6095848298f03ca328380a7d453 (diff)
parent812665445fd370842a1b8abf7cddbd33f3ddaa5c (diff)
Merge PR #11735: Deprecating catchable_exception
Reviewed-by: ejgallego Reviewed-by: ppedrot
Diffstat (limited to 'proofs')
-rw-r--r--proofs/logic.mli1
-rw-r--r--proofs/refiner.ml10
2 files changed, 4 insertions, 7 deletions
diff --git a/proofs/logic.mli b/proofs/logic.mli
index 5342b94b3e..ef8b2731b2 100644
--- a/proofs/logic.mli
+++ b/proofs/logic.mli
@@ -50,6 +50,7 @@ exception RefinerError of Environ.env * evar_map * refiner_error
val error_no_such_hypothesis : Environ.env -> evar_map -> Id.t -> 'a
val catchable_exception : exn -> bool
+[@@ocaml.deprecated "This function does not scale in the presence of dynamically added exceptions. Use instead CErrors.noncritical, or the exact name of the exception that matters in the corresponding case."]
(** Move destination for hypothesis *)
diff --git a/proofs/refiner.ml b/proofs/refiner.ml
index 2ef54540ff..75c3436cf4 100644
--- a/proofs/refiner.ml
+++ b/proofs/refiner.ml
@@ -204,14 +204,10 @@ let tclSHOWHYPS (tac : tactic) (goal: Goal.goal Evd.sigma)
let catch_failerror (e, info) =
- if catchable_exception e then Control.check_for_interrupt ()
- else match e with
- | FailError (0,_) ->
- Control.check_for_interrupt ()
- | FailError (lvl,s) ->
+ match e with
+ | FailError (lvl,s) when lvl > 0 ->
Exninfo.iraise (FailError (lvl - 1, s), info)
- | e -> Exninfo.iraise (e, info)
- (** FIXME: do we need to add a [Errors.push] here? *)
+ | e -> Control.check_for_interrupt ()
(* ORELSE0 t1 t2 tries to apply t1 and if it fails, applies t2 *)
let tclORELSE0 t1 t2 g =