1 (* Copyright (C) 2004-2005, HELM Team.
3 * This file is part of HELM, an Hypertextual, Electronic
4 * Library of Mathematics, developed at the Computer Science
5 * Department, University of Bologna, Italy.
7 * HELM is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * HELM is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with HELM; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
22 * For details, see the HELM World-Wide-Web page,
23 * http://helm.cs.unibo.it/
30 | MatitaTypes.Option_error ("baseuri", "not found" ) ->
31 "Baseuri not set for this script. "
32 ^ "Use 'set \"baseuri\" \"<uri>\".' to set it."
33 | MatitaTypes.Command_error msg -> "Error: " ^ msg
34 | CicNotationParser.Parse_error (floc,err) ->
35 let (x, y) = CicNotationPt.loc_of_floc floc in
36 sprintf "Parse error at %d-%d: %s" x y err
37 | UriManager.IllFormedUri uri -> sprintf "invalid uri: %s" uri
38 | CicEnvironment.Object_not_found uri ->
39 sprintf "object not found: %s" (UriManager.string_of_uri uri)
40 | Unix.Unix_error (code, api, param) ->
41 let err = Unix.error_message code in
42 "Unix Error (" ^ api ^ "): " ^ err
43 | MatitaMoo.Corrupt_moo fname ->
44 sprintf ".moo file '%s' is corrupt (shorter than expected)" fname
45 | MatitaMoo.Checksum_failure fname ->
46 sprintf "checksum failed for .moo file '%s', please recompile it'" fname
47 | MatitaMoo.Version_mismatch fname ->
49 (".moo file '%s' has been compiled by a different version of matita, "
50 ^^ "please recompile it")
52 | ProofEngineTypes.Fail msg -> "Tactic error: " ^ Lazy.force msg
53 | Continuationals.Error s -> "Tactical error: " ^ Lazy.force s
54 | exn -> "Uncaught exception: " ^ Printexc.to_string exn