From 0a2d4485302b2e0c1710500def3731fb4d866cc9 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Tue, 9 May 2006 16:26:48 +0000 Subject: [PATCH] few more bits for zack --- daemons/whelp/searchEngine.conf.xml.sample | 1 + daemons/whelp/searchEngine.ml | 16 +++++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/daemons/whelp/searchEngine.conf.xml.sample b/daemons/whelp/searchEngine.conf.xml.sample index 6d646020f..06e825e39 100644 --- a/daemons/whelp/searchEngine.conf.xml.sample +++ b/daemons/whelp/searchEngine.conf.xml.sample @@ -1,6 +1,7 @@
+ false mowgli.cs.unibo.it helm mowgli diff --git a/daemons/whelp/searchEngine.ml b/daemons/whelp/searchEngine.ml index 26c1def3e..e98bfe356 100644 --- a/daemons/whelp/searchEngine.ml +++ b/daemons/whelp/searchEngine.ml @@ -357,7 +357,9 @@ let exec_action dbd (req: Http_types.request) outchan = end in let module Disambiguate' = Disambiguate.Make(Chat) in +prerr_endline "VOVI"; let ast = Grammar.Entry.parse CicNotationParser.term (Stream.of_string term_str) in +prerr_endline "VIVO"; let (id_to_uris, metasenv, term) = match Disambiguate'.disambiguate_term ~dbd ~context ~metasenv @@ -466,6 +468,11 @@ let callback dbd (req: Http_types.request) outchan = bad_request (sprintf "Parameter '%s' is missing" attr_name) outchan | CicNotationParser.Parse_error msg -> send_results (`Error (MooglePp.pp_error "Parse error" msg)) req outchan + | Stdpp.Exc_located (floc, Stream.Error msg) -> + send_results (`Error (MooglePp.pp_error "Parse error" msg)) req outchan + | Stdpp.Exc_located (floc, exn) -> + let msg = Printexc.to_string exn in + send_results (`Error (MooglePp.pp_error "Unknown error" msg)) req outchan | Unbound_identifier id -> send_results (`Error (MooglePp.pp_error "Unbound identifier" id)) req outchan @@ -488,11 +495,10 @@ let restore_environment () = printf "done!\n"; flush stdout let read_notation () = - let _ = assert false in () - (* - CicNotation.load_notation (Helm_registry.get "search_engine.notations"); - CicNotation.load_notation (Helm_registry.get "search_engine.interpretations") - *) + CicNotation2.load_notation ~include_paths:[] + (Helm_registry.get "search_engine.notations"); + CicNotation2.load_notation ~include_paths:[] + (Helm_registry.get "search_engine.interpretations") let _ = printf "%s started and listening on port %d\n" daemon_name port; -- 2.39.2