aboutsummaryrefslogtreecommitdiffhomepage
path: root/toplevel/mltop.ml
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-03-13 00:00:49 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2013-03-13 00:00:49 +0000
commitc526b81a9a682edf2270cb544e61fe60355003dc (patch)
tree56d5b350997fd29d02fc65b584e6146c81c424b6 /toplevel/mltop.ml
parenta5aaef33d5cab01177105299a2414c9544860cca (diff)
Restrict (try...with...) to avoid catching critical exn (part 13)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16290 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'toplevel/mltop.ml')
-rw-r--r--toplevel/mltop.ml9
1 files changed, 4 insertions, 5 deletions
diff --git a/toplevel/mltop.ml b/toplevel/mltop.ml
index e5e4ff599..e0daf53f1 100644
--- a/toplevel/mltop.ml
+++ b/toplevel/mltop.ml
@@ -117,11 +117,10 @@ let dir_ml_load s =
| WithTop t ->
(try t.load_obj s
with
- | e ->
+ | e when Errors.noncritical e ->
let e = Errors.push e in
match e with
| (UserError _ | Failure _ | Not_found as u) -> raise u
- | u when is_anomaly u -> raise u
| exc ->
let msg = report_on_load_obj_error exc in
errorlabstrm "Mltop.load_object" (str"Cannot link ml-object " ++
@@ -164,7 +163,7 @@ let add_path ~unix_path:dir ~coq_root:coq_dirpath =
let convert_string d =
try Names.Id.of_string d
- with _ ->
+ with UserError _ ->
if_warn msg_warning (str ("Directory "^d^" cannot be used as a Coq identifier (skipped)"));
raise Exit
@@ -293,9 +292,9 @@ let if_verbose_load verb f name fname =
try
f name fname;
msg_info (str (info^" done]"));
- with e ->
+ with reraise ->
msg_info (str (info^" failed]"));
- raise e
+ raise reraise
(** Load a module for the first time (i.e. dynlink it)
or simulate its reload (i.e. doing nothing except maybe