From 6d378686e7986a391130b98019c7c52de27c42e7 Mon Sep 17 00:00:00 2001 From: letouzey Date: Wed, 13 Mar 2013 00:00:25 +0000 Subject: Restrict (try...with...) to avoid catching critical exn (part 9) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16285 85f007b7-540e-0410-9357-904b9bb8a0f7 --- plugins/cc/ccalgo.ml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'plugins/cc') diff --git a/plugins/cc/ccalgo.ml b/plugins/cc/ccalgo.ml index c8238804a0..473199cb2a 100644 --- a/plugins/cc/ccalgo.ml +++ b/plugins/cc/ccalgo.ml @@ -400,9 +400,12 @@ let rec canonize_name c = (* rebuild a term from a pattern and a substitution *) let build_subst uf subst = - Array.map (fun i -> - try term uf i - with _ -> anomaly (Pp.str "incomplete matching")) subst + Array.map + (fun i -> + try term uf i + with e when Errors.noncritical e -> + anomaly (Pp.str "incomplete matching")) + subst let rec inst_pattern subst = function PVar i -> -- cgit v1.2.3