X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2FmatitaExcPp.ml;h=3ad6da153095dac5c56a026a084e1aabb147342c;hb=4167cea65ca58897d1a3dbb81ff95de5074700cc;hp=74f2c9f41a03432d8aca76b8a4af059c2da456fb;hpb=6857e22b8a58162893119f7747c5848031fd59ce;p=helm.git diff --git a/helm/matita/matitaExcPp.ml b/helm/matita/matitaExcPp.ml index 74f2c9f41..3ad6da153 100644 --- a/helm/matita/matitaExcPp.ml +++ b/helm/matita/matitaExcPp.ml @@ -31,11 +31,42 @@ let to_string = "Baseuri not set for this script. " ^ "Use 'set \"baseuri\" \"\".' to set it." | MatitaTypes.Command_error msg -> "Error: " ^ msg - | CicTextualParser2.Parse_error (floc,err) -> - let (x, y) = CicAst.loc_of_floc floc in + | 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 + | MatitaMoo.Corrupt_moo fname -> + sprintf ".moo file '%s' is corrupt (shorter than expected)" fname + | MatitaMoo.Checksum_failure fname -> + sprintf "checksum failed for .moo file '%s', please recompile it'" fname + | MatitaMoo.Version_mismatch fname -> + sprintf + (".moo file '%s' has been compiled by a different version of matita, " + ^^ "please recompile it") + fname + | ProofEngineTypes.Fail msg -> "Tactic error: " ^ Lazy.force msg + | Continuationals.Error s -> "Tactical error: " ^ Lazy.force s + | CicTypeChecker.TypeCheckerFailure msg -> + "Type checking error: " ^ Lazy.force msg + | CicTypeChecker.AssertFailure msg -> + "Type checking assertion failed: " ^ Lazy.force msg + | MatitaDisambiguator.DisambiguationError errorll -> + let rec aux n = + function + [] -> "" + | phase::tl -> + aux (n+1) tl ^ + "***** Errors obtained during phase " ^ string_of_int n ^": *****\n"^ + String.concat "\n\n" + (List.map (fun msg -> "*Error: " ^ Lazy.force msg) phase) ^ + "\n\n\n" + in + "********** DISAMBIGUATION ERRORS: **********\n" ^ + aux 1 errorll | exn -> "Uncaught exception: " ^ Printexc.to_string exn