diff options
author | Alain Frisch <alain@frisch.fr> | 2012-03-07 17:40:17 +0000 |
---|---|---|
committer | Alain Frisch <alain@frisch.fr> | 2012-03-07 17:40:17 +0000 |
commit | 864e8554aeef0cb1078a39a4750c02ee8e25b87d (patch) | |
tree | 3a331474ffb9734a8a5939a8824928ea300f9491 | |
parent | 5f632b7b12bf2d7d42644193998f1d5261b41761 (diff) |
#5527: absolute filenames for more error messages.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12201 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | asmcomp/asmlink.ml | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/asmcomp/asmlink.ml b/asmcomp/asmlink.ml index 8a1109fd6..e99e62a39 100644 --- a/asmcomp/asmlink.ml +++ b/asmcomp/asmlink.ml @@ -342,7 +342,8 @@ let report_error ppf = function | File_not_found name -> fprintf ppf "Cannot find file %s" name | Not_an_object_file name -> - fprintf ppf "The file %s is not a compilation unit description" name + fprintf ppf "The file %a is not a compilation unit description" + Location.print_filename name | Missing_implementations l -> let print_references ppf = function | [] -> () @@ -359,27 +360,35 @@ let report_error ppf = function print_modules l | Inconsistent_interface(intf, file1, file2) -> fprintf ppf - "@[<hov>Files %s@ and %s@ make inconsistent assumptions \ + "@[<hov>Files %a@ and %a@ make inconsistent assumptions \ over interface %s@]" - file1 file2 intf + Location.print_filename file1 + Location.print_filename file2 + intf | Inconsistent_implementation(intf, file1, file2) -> fprintf ppf - "@[<hov>Files %s@ and %s@ make inconsistent assumptions \ + "@[<hov>Files %a@ and %a@ make inconsistent assumptions \ over implementation %s@]" - file1 file2 intf + Location.print_filename file1 + Location.print_filename file2 + intf | Assembler_error file -> - fprintf ppf "Error while assembling %s" file + fprintf ppf "Error while assembling %a" Location.print_filename file | Linking_error -> fprintf ppf "Error during linking" | Multiple_definition(modname, file1, file2) -> fprintf ppf - "@[<hov>Files %s@ and %s@ both define a module named %s@]" - file1 file2 modname + "@[<hov>Files %a@ and %a@ both define a module named %s@]" + Location.print_filename file1 + Location.print_filename file2 + modname | Missing_cmx(filename, name) -> fprintf ppf - "@[<hov>File %s@ was compiled without access@ \ + "@[<hov>File %a@ was compiled without access@ \ to the .cmx file@ for module %s,@ \ which was produced by `ocamlopt -for-pack'.@ \ - Please recompile %s@ with the correct `-I' option@ \ + Please recompile %a@ with the correct `-I' option@ \ so that %s.cmx@ is found.@]" - filename name filename name + Location.print_filename filename name + Location.print_filename filename + name |