]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/matitaGui.ml
- avoid catching top level exceptions when the relevant setting in the registry is set
[helm.git] / helm / matita / matitaGui.ml
index a3d35c8e1129081de4c82de57706350f23b3cb74..e0ca8c6816fb88b97bc00e59d7f0122adf408f15 100644 (file)
@@ -566,7 +566,10 @@ class gui () =
         (* log *)
       MatitaLog.set_log_callback self#console#log_callback;
       GtkSignal.user_handler :=
-        (fun exn -> MatitaLog.error (MatitaExcPp.to_string exn));
+        (fun exn ->
+          if Helm_registry.get_bool "matita.catch_top_level_exn" then
+            MatitaLog.error (MatitaExcPp.to_string exn)
+          else raise exn);
         (* script *)
       let _ =
         match GSourceView.source_language_from_file BuildTimeConf.lang_file with
@@ -1055,9 +1058,7 @@ let interactive_interp_choice () choices =
   let selection = dialog#interpChoiceTreeView#selection in
   ignore (selection#connect#changed (fun _ ->
     match selection#get_selected_rows with
-    | [path] ->
-        MatitaLog.debug (sprintf "selection: %d" (model#get_interp_no path));
-        interp_no := Some (model#get_interp_no path)
+    | [path] -> interp_no := Some (model#get_interp_no path)
     | _ -> assert false));
   dialog#interpChoiceDialog#show ();
   GtkThread.main ();