diff options
| author | letouzey | 2013-03-13 00:00:17 +0000 |
|---|---|---|
| committer | letouzey | 2013-03-13 00:00:17 +0000 |
| commit | 9aecb4427f0f8ca3cb4c26bc7f73bb74164a93d9 (patch) | |
| tree | 36a4ab30f4a75e73c9f4921cca1d25d1cb7cd545 /lib/serialize.ml | |
| parent | 552df1605233769ad3cdabaadaa0011605e79797 (diff) | |
Restrict (try...with...) to avoid catching critical exn (part 8)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16284 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib/serialize.ml')
| -rw-r--r-- | lib/serialize.ml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/serialize.ml b/lib/serialize.ml index 218372afc2..7c82d6b80d 100644 --- a/lib/serialize.ml +++ b/lib/serialize.ml @@ -100,8 +100,8 @@ let abstract_eval_call handler c = | Quit -> Obj.magic (handler.quit () : unit) | About -> Obj.magic (handler.about () : coq_info) in Good res - with e -> - let (l, str) = handler.handle_exn e in + with any -> + let (l, str) = handler.handle_exn any in Fail (l,str) (** * XML data marshalling *) @@ -282,7 +282,7 @@ let to_value f = function let loc_s = int_of_string (List.assoc "loc_s" attrs) in let loc_e = int_of_string (List.assoc "loc_e" attrs) in Some (loc_s, loc_e) - with _ -> None + with Not_found | Failure _ -> None in let msg = raw_string l in Fail (loc, msg) |
