aboutsummaryrefslogtreecommitdiffhomepage
path: root/toplevel
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2004-03-16 15:09:19 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2004-03-16 15:09:19 +0000
commit3160db4da2e45729b562fea86edab77c357e3066 (patch)
tree037c063fbb85e84f2f28c2c3d79e9164a503ec27 /toplevel
parent554d691431f7bb7ef8cd1498230a89c21132cf86 (diff)
Adaptation a la v7 du message d'erreur Match_failure
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@5506 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'toplevel')
-rw-r--r--toplevel/cerrors.ml12
1 files changed, 8 insertions, 4 deletions
diff --git a/toplevel/cerrors.ml b/toplevel/cerrors.ml
index 719f7434a..91eb4056e 100644
--- a/toplevel/cerrors.ml
+++ b/toplevel/cerrors.ml
@@ -51,10 +51,14 @@ let rec explain_exn_default = function
| Anomaly (s,pps) ->
hov 1 (str "Anomaly: " ++ where s ++ pps ++ report ())
| Match_failure(filename,pos1,pos2) ->
- hov 1 (str "Anomaly: Match failure in file " ++
- str (guill filename) ++ str " from char #" ++
- int pos1 ++ str " to #" ++ int pos2 ++
- report ())
+ hov 1 (str "Anomaly: Match failure in file " ++ str (guill filename) ++
+ if Sys.ocaml_version = "3.06" then
+ (str " from character " ++ int pos1 ++
+ str " to " ++ int pos2)
+ else
+ (str " at line " ++ int pos1 ++
+ str " character " ++ int pos2)
+ ++ report ())
| Not_found ->
hov 0 (str "Anomaly: uncaught exception Not_found" ++ report ())
| Failure s ->