aboutsummaryrefslogtreecommitdiff
path: root/plugins/extraction/extraction.ml
diff options
context:
space:
mode:
authorletouzey2013-03-13 00:00:08 +0000
committerletouzey2013-03-13 00:00:08 +0000
commitda3cbbcef1f4de9780603225e095f026bb5da709 (patch)
tree245855016cea9d25fcd643f841bc868bd81ec440 /plugins/extraction/extraction.ml
parent108e88cafee662932c99a83230f674f648866613 (diff)
Restrict (try...with...) to avoid catching critical exn (part 6)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16282 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'plugins/extraction/extraction.ml')
-rw-r--r--plugins/extraction/extraction.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/extraction/extraction.ml b/plugins/extraction/extraction.ml
index 035f8e3bb2..3ec9038c63 100644
--- a/plugins/extraction/extraction.ml
+++ b/plugins/extraction/extraction.ml
@@ -144,11 +144,11 @@ let sign_with_implicits r s nb_params =
let rec handle_exn r n fn_name = function
| MLexn s ->
- (try Scanf.sscanf s "UNBOUND %d"
+ (try Scanf.sscanf s "UNBOUND %d%!"
(fun i ->
assert ((0 < i) && (i <= n));
MLexn ("IMPLICIT "^ msg_non_implicit r (n+1-i) (fn_name i)))
- with _ -> MLexn s)
+ with Scanf.Scan_failure _ | End_of_file -> MLexn s)
| a -> ast_map (handle_exn r n fn_name) a
(*S Management of type variable contexts. *)