From c7f63628e3659cc95235c71402c43b50aef3893d Mon Sep 17 00:00:00 2001 From: herbelin Date: Mon, 4 Jan 2010 14:06:05 +0000 Subject: Errors issued by reduction tactics (e.g. pattern) were not caught by "try". git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12621 85f007b7-540e-0410-9357-904b9bb8a0f7 --- proofs/logic.ml | 2 ++ test-suite/success/pattern.v | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/proofs/logic.ml b/proofs/logic.ml index 0fbd8ad21c..f0f03febb1 100644 --- a/proofs/logic.ml +++ b/proofs/logic.ml @@ -53,6 +53,8 @@ let rec catchable_exception = function | Util.UserError _ | TypeError _ | RefinerError _ | Indrec.RecursionSchemeError _ | Nametab.GlobalizationError _ | PretypeError (_,VarNotFound _) + (* reduction errors *) + | Tacred.ReductionTacticError _ (* unification errors *) | PretypeError(_,(CannotUnify _|CannotUnifyLocal _|CannotGeneralize _ |NoOccurrenceFound _|CannotUnifyBindingType _|NotClean _ diff --git a/test-suite/success/pattern.v b/test-suite/success/pattern.v index 23e6f8e359..72f84052d7 100644 --- a/test-suite/success/pattern.v +++ b/test-suite/success/pattern.v @@ -42,3 +42,8 @@ Goal 0=1->1=0->True. intros H1 H2. pattern 0 at 1, 1 in H1, H2 || exact I. (* check pattern fails *) Qed. + +(* Test catching of reduction tactics errors (was not the case in 8.2) *) +Goal eq_refl 0 = eq_refl 0. +pattern 0 at 1 || reflexivity. +Qed. -- cgit v1.2.3