From 3160db4da2e45729b562fea86edab77c357e3066 Mon Sep 17 00:00:00 2001 From: herbelin Date: Tue, 16 Mar 2004 15:09:19 +0000 Subject: 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 --- toplevel/cerrors.ml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/toplevel/cerrors.ml b/toplevel/cerrors.ml index 719f7434a4..91eb4056e1 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 -> -- cgit v1.2.3