aboutsummaryrefslogtreecommitdiff
path: root/parsing
diff options
context:
space:
mode:
authorletouzey2013-03-13 00:00:25 +0000
committerletouzey2013-03-13 00:00:25 +0000
commit6d378686e7986a391130b98019c7c52de27c42e7 (patch)
tree335e6fbbf484c8e19b3a1e1461b93c5632256315 /parsing
parent9aecb4427f0f8ca3cb4c26bc7f73bb74164a93d9 (diff)
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
Diffstat (limited to 'parsing')
-rw-r--r--parsing/g_tactic.ml42
-rw-r--r--parsing/g_xml.ml43
2 files changed, 3 insertions, 2 deletions
diff --git a/parsing/g_tactic.ml4 b/parsing/g_tactic.ml4
index 6daceb03da..89323bc673 100644
--- a/parsing/g_tactic.ml4
+++ b/parsing/g_tactic.ml4
@@ -131,7 +131,7 @@ let induction_arg_of_constr (c,lbind as clbind) = match lbind with
| NoBindings ->
begin
try ElimOnIdent (Constrexpr_ops.constr_loc c,snd(Constrexpr_ops.coerce_to_id c))
- with _ -> ElimOnConstr clbind
+ with e when Errors.noncritical e -> ElimOnConstr clbind
end
| _ -> ElimOnConstr clbind
diff --git a/parsing/g_xml.ml4 b/parsing/g_xml.ml4
index 372f92eed1..982b71ba0d 100644
--- a/parsing/g_xml.ml4
+++ b/parsing/g_xml.ml4
@@ -112,7 +112,8 @@ let get_xml_sort al = sort_of_cdata (get_xml_attr "value" al)
let get_xml_inductive_kn al =
inductive_of_cdata (* uriType apparent synonym of uri *)
- (try get_xml_attr "uri" al with _ -> get_xml_attr "uriType" al)
+ (try get_xml_attr "uri" al
+ with UserError _ -> get_xml_attr "uriType" al)
let get_xml_constant al = constant_of_cdata (get_xml_attr "uri" al)