aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorvsiles2010-04-27 13:38:38 +0000
committervsiles2010-04-27 13:38:38 +0000
commit7c9f70309b0d21c0d4775bd9da00bdb72e8c1a9e (patch)
treef6914b62b7f59c284aa3c8c3473d6c568d41f800 /lib
parent3bbcfded9c83e5f7a44d1fcd7dc2c4a8a1f3fcbe (diff)
Added a new exception for already declared Schemes,
so that we can return the right error message when trying to declare a scheme twice. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12965 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'lib')
-rw-r--r--lib/util.ml3
-rw-r--r--lib/util.mli3
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/util.ml b/lib/util.ml
index f3b7c99e90..ce98d32349 100644
--- a/lib/util.ml
+++ b/lib/util.ml
@@ -22,6 +22,9 @@ let errorlabstrm l pps = raise (UserError(l,pps))
exception AnomalyOnError of string * exn
+exception AlreadyDeclared of std_ppcmds (* for already declared Schemes *)
+let alreadydeclared pps = raise (AlreadyDeclared(pps))
+
let todo s = prerr_string ("TODO: "^s^"\n")
exception Timeout
diff --git a/lib/util.mli b/lib/util.mli
index 80f2fda380..810e6f0c77 100644
--- a/lib/util.mli
+++ b/lib/util.mli
@@ -26,6 +26,9 @@ exception UserError of string * std_ppcmds
val error : string -> 'a
val errorlabstrm : string -> std_ppcmds -> 'a
+exception AlreadyDeclared of std_ppcmds
+val alreadydeclared : std_ppcmds -> 'a
+
exception AnomalyOnError of string * exn
(* [todo] is for running of an incomplete code its implementation is