[m-rev.] for review: improve `mmc --make' error message

Simon Taylor stayl at cs.mu.OZ.AU
Mon May 27 18:08:55 AEST 2002



Estimated hours taken: 0.25

compiler/make.module_dep_file.m:
	Improve the error message when `mmc --make'
	can't find a module.

Index: make.module_dep_file.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/make.module_dep_file.m,v
retrieving revision 1.4
diff -u -u -r1.4 make.module_dep_file.m
--- make.module_dep_file.m	21 May 2002 19:04:26 -0000	1.4
+++ make.module_dep_file.m	27 May 2002 07:48:14 -0000
@@ -495,9 +495,15 @@
 		Items, Error, SourceFileName, _),
 	( { Error = fatal_module_errors } ->
 	    io__set_output_stream(OldOutputStream, _),
-	    io__write_string("** Error: error reading file `"),
-	    io__write_string(SourceFileName),
-	    io__write_string("' to generate dependencies.\n"),
+	    io__write_string(
+"** Error: error reading file `" ++ SourceFileName ++ "' to generate\n"),
+	    io__write_string(
+"**   dependencies.  Possible causes are a nonexistent module\n"),
+	    io__write_string(
+"**   specified in a target or in an `:- import_module' or `:- use_module'\n"),
+	    io__write_string(
+"**   declaration, or a using a library built without `--generate-mmc-deps'.\n"
+	    ),
 
 	    % Display the contents of the `.err' file, then remove it
 	    % so we don't leave `.err' files lying around for nonexistent
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list