]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/library/librarySync.ml
More exceptions pretty-printed.
[helm.git] / helm / software / components / library / librarySync.ml
index 086893a974985e614026bfaebd29b89e5f4de912..e621a7a0cf1311ef26319e7363714db36fce5383 100644 (file)
@@ -149,7 +149,7 @@ let add_single_obj uri obj refinement_toolkit =
         raise exc
     with exc ->
       CicEnvironment.remove_obj uri; (* -1 *)
-    raise exc
+      raise exc
   end
 
 let remove_single_obj uri =
@@ -444,6 +444,7 @@ let
 let add_obj refinement_toolkit uri obj =
  add_single_obj uri obj refinement_toolkit;
  let uris = ref [] in
+ let not_debug = not (Helm_registry.get_bool "matita.debug") in
  try
   begin
    match obj with
@@ -474,9 +475,10 @@ let add_obj refinement_toolkit uri obj =
   end;
   UriManager.UriHashtbl.add auxiliary_lemmas_hashtbl uri !uris;
   !uris
- with exn ->
-  List.iter remove_single_obj !uris;
-  raise exn
+ with 
+ | exn when not_debug ->
+    List.iter remove_single_obj !uris;
+    raise exn
 
 let remove_obj uri =
  let uris =