]> matita.cs.unibo.it Git - helm.git/commitdiff
Reloading bugged stylesheets no longer makes gTopLevel crash.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Fri, 27 Jun 2003 13:51:55 +0000 (13:51 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Fri, 27 Jun 2003 13:51:55 +0000 (13:51 +0000)
helm/gTopLevel/gTopLevel.ml

index 5e6b181629204859824440fcdd40a261bf645575..d71162d1e5b3b058e89519444f8a930e7938a299 100644 (file)
@@ -2776,8 +2776,21 @@ class rendering_window output (notebook : notebook) =
    ~callback:
      (function _ ->
        ApplyStylesheets.reload_stylesheets () ;
-       refresh_proof output ;
-       refresh_goals notebook
+       if !ProofEngine.proof <> None then
+        try
+         refresh_goals notebook ;
+         refresh_proof output
+        with
+           InvokeTactics.RefreshSequentException e ->
+            output_html (outputhtml ())
+             ("<h1 color=\"red\">An error occurred while refreshing the " ^
+               "sequent: " ^ Printexc.to_string e ^ "</h1>") ;
+           (*notebook#remove_all_pages ~skip_switch_page_event:false ;*)
+           notebook#set_empty_page
+         | InvokeTactics.RefreshProofException e ->
+            output_html (outputhtml ())
+             ("<h1 color=\"red\">An error occurred while refreshing the proof: "               ^ Printexc.to_string e ^ "</h1>") ;
+            output#unload
      ) in
  (* accel group *)
  let _ = window#add_accel_group accel_group in