]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/matitaExcPp.ml
added homepage URL, now we have one
[helm.git] / helm / matita / matitaExcPp.ml
index c672e2e704598755f91cb943ae05a8b94eecddf9..f141b129a73b686448c694a334af057e8d5f7de6 100644 (file)
  * http://helm.cs.unibo.it/
  *)
 
-open MatitaTypes;;
-open Printf;;
+open Printf
 
 let to_string = 
   function
-  | Option_error ("baseuri", "not found" ) -> 
-      "Baseuri not set for this script. Use 'set \"baseuri\" \"<uri>\".' to set it."
-  | CicTextualParser2.Parse_error (floc,err) ->
-      let (x, y) = CicAst.loc_of_floc floc in
+  | MatitaTypes.Option_error ("baseuri", "not found" ) -> 
+      "Baseuri not set for this script. "
+      ^ "Use 'set \"baseuri\" \"<uri>\".' to set it."
+  | MatitaTypes.Command_error msg -> "Error: " ^ msg
+  | CicNotationParser.Parse_error (floc,err) ->
+      let (x, y) = CicNotationPt.loc_of_floc floc in
       sprintf "Parse error at %d-%d: %s" x y err
+  | UriManager.IllFormedUri uri -> sprintf "invalid uri: %s" uri
+  | CicEnvironment.Object_not_found uri ->
+      sprintf "object not found: %s" (UriManager.string_of_uri uri)
+  | Unix.Unix_error (code, api, param) ->
+      let err = Unix.error_message code in
+      "Unix Error (" ^ api ^ "): " ^ err
   | exn -> "Uncaught exception: " ^ Printexc.to_string exn
+