]> matita.cs.unibo.it Git - helm.git/blobdiff - matitaB/matita/matitadaemon.ml
Fixes a bug in NnAuto: printing the statistics triggered loading of
[helm.git] / matitaB / matita / matitadaemon.ml
index 20a1d91c97797cd8603078d677e016d45187148b..14bcf1db6d9b757d34c50263f8fd26194cef33e3 100644 (file)
@@ -407,7 +407,7 @@ let advance0 sid text =
   let status = status#reset_disambiguate_db () in
   let (st,new_statements,new_unparsed),parsed_len =
     try
-    eval_statement !include_paths (*buffer*) status (`Raw text)
+      eval_statement !include_paths (*buffer*) status (`Raw text)
     with
     | HExtlib.Localized (floc,e) as exn ->
       let x, y = HExtlib.loc_of_floc floc in
@@ -758,7 +758,8 @@ let advance (cgi : Netcgi1_compat.Netcgi_types.cgi_activation) =
       ~status:`Internal_server_error
       ~cache:`No_cache 
       ~content_type:"text/xml; charset=\"utf-8\""
-      ());
+      ()
+  );
   cgi#out_channel#commit_work()
 ;;
 
@@ -841,12 +842,12 @@ let gotoTop (cgi : Netcgi1_compat.Netcgi_types.cgi_activation) =
     let baseuri = status#baseuri in
     let new_status = new MatitaEngine.status (Some uid) baseuri in
     prerr_endline "gototop prima della time travel";
-    NCicLibrary.time_travel new_status;
+    (* NCicLibrary.time_travel new_status; *)
     prerr_endline "gototop dopo della time travel";
     let new_history = [new_status] in 
     MatitaAuthentication.set_history sid new_history;
     MatitaAuthentication.set_status sid new_status;
-    NCicLibrary.time_travel new_status;
+    (* NCicLibrary.time_travel new_status; *)
     cgi # set_header 
       ~cache:`No_cache 
       ~content_type:"text/xml; charset=\"utf-8\""
@@ -891,7 +892,9 @@ let retract (cgi : Netcgi1_compat.Netcgi_types.cgi_activation) =
       ~content_type:"text/xml; charset=\"utf-8\""
       ();
     cgi#out_channel#output_string body
-   with _ -> cgi#set_header ~status:`Internal_server_error 
+   with e -> 
+    prerr_endline ("error in retract: " ^ Printexc.to_string e);
+    cgi#set_header ~status:`Internal_server_error 
       ~cache:`No_cache 
       ~content_type:"text/xml; charset=\"utf-8\"" ());
   cgi#out_channel#commit_work()