X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2FmatitaMathView.ml;h=28bd1caaa7f35ae3244c3fc19ce93d120fddc656;hb=29a5b18f3da1a3ed648f23709384b7789cb099bf;hp=43547b8ff9e835da80e588d3c1efdd8db659c1bb;hpb=5215754e8ad1c83991135e94ad1e7ab63818d1cb;p=helm.git diff --git a/helm/matita/matitaMathView.ml b/helm/matita/matitaMathView.ml index 43547b8ff..28bd1caaa 100644 --- a/helm/matita/matitaMathView.ml +++ b/helm/matita/matitaMathView.ml @@ -590,7 +590,10 @@ class cicBrowser_impl ~(history:MatitaTypes.mathViewer_entry MatitaMisc.history) let handle_error f = try f () - with exn -> fail (MatitaExcPp.to_string exn) + with exn -> + if Helm_registry.get_bool "matita.catch_top_level_exn" then + fail (MatitaExcPp.to_string exn) + else raise exn in let handle_error' f = (fun () -> handle_error (fun () -> f ())) in let load_easter_egg = lazy ( @@ -701,7 +704,7 @@ class cicBrowser_impl ~(history:MatitaTypes.mathViewer_entry MatitaMisc.history) (* loads a uri which can be a cic uri or an about:* uri * @param uri string *) method private _load ?(force=false) entry = - try + handle_error (fun () -> if entry <> current_entry || entry = `About `Current_proof || force then begin (match entry with @@ -717,8 +720,7 @@ class cicBrowser_impl ~(history:MatitaTypes.mathViewer_entry MatitaMisc.history) self#_loadList (List.map (fun r -> "obj", UriManager.string_of_uri r) results)); self#setEntry entry - end - with exn -> fail (MatitaExcPp.to_string exn) + end) method private blank () = self#_showMath;