aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pretyping/reductionops.ml13
-rw-r--r--tactics/class_tactics.ml2
-rw-r--r--vernac/ppvernac.ml12
3 files changed, 15 insertions, 12 deletions
diff --git a/pretyping/reductionops.ml b/pretyping/reductionops.ml
index 6f02d76f3a..cb6e8f086e 100644
--- a/pretyping/reductionops.ml
+++ b/pretyping/reductionops.ml
@@ -1097,12 +1097,17 @@ let pb_equal = function
| Reduction.CUMUL -> Reduction.CONV
| Reduction.CONV -> Reduction.CONV
+exception AnomalyInConversion of exn
+
+let _ = CErrors.register_handler (function
+ | AnomalyInConversion e ->
+ Some Pp.(str "Conversion test raised an anomaly:" ++
+ spc () ++ CErrors.print e)
+ | _ -> None)
+
let report_anomaly (e, info) =
let e =
- if is_anomaly e then
- let msg = Pp.(str "Conversion test raised an anomaly:" ++
- spc () ++ CErrors.print e) in
- UserError (None, msg)
+ if is_anomaly e then AnomalyInConversion e
else e
in
Exninfo.iraise (e, info)
diff --git a/tactics/class_tactics.ml b/tactics/class_tactics.ml
index 82ce2234e3..63cafbf76d 100644
--- a/tactics/class_tactics.ml
+++ b/tactics/class_tactics.ml
@@ -236,7 +236,7 @@ let with_prods nprods h f =
f gl (h, diff)
with e when CErrors.noncritical e ->
let e, info = Exninfo.capture e in
- Tacticals.New.tclZEROMSG ~info (CErrors.print e) end
+ Proofview.tclZERO ~info e end
else Proofview.Goal.enter
begin fun gl ->
if Int.equal nprods 0 then f gl (h, None)
diff --git a/vernac/ppvernac.ml b/vernac/ppvernac.ml
index e0974ac027..b93c920654 100644
--- a/vernac/ppvernac.ml
+++ b/vernac/ppvernac.ml
@@ -1331,10 +1331,8 @@ let pr_vernac_attributes =
| flags -> str "#[" ++ pr_vernac_flags flags ++ str "]" ++ cut ()
let pr_vernac ({v = {control; attrs; expr}} as v) =
- try
- tag_vernac v
- (pr_vernac_control control ++
- pr_vernac_attributes attrs ++
- pr_vernac_expr expr ++
- sep_end expr)
- with e -> CErrors.print e
+ tag_vernac v
+ (pr_vernac_control control ++
+ pr_vernac_attributes attrs ++
+ pr_vernac_expr expr ++
+ sep_end expr)