shithub: mc

Download patch

ref: c22210810667b4de2a2f77524e9597e9517c0e4a
parent: 8c87204a19493923a26d239ceda3c8b6b5808e87
author: Ori Bernstein <ori@eigenstate.org>
date: Sun Jan 4 09:21:05 EST 2015

Improve comprehensibility of error messages.

--- a/deps.myr
+++ b/deps.myr
@@ -110,7 +110,7 @@
 			scrapelibs(g, lib, incs)
 		| `Local l:
 			if !std.hassuffix(l, ".use")
-				std.fatal(1, "usefile dependency \"%s\" of \"%s\" is not a usefile\n", l, path)
+				std.fatal(1, "local dependency \"%s\" of \"%s\" should end with .use\n", l, path)
 			;;
 			if obj.len != 0
 				pushdep(g, l, obj)
@@ -187,8 +187,8 @@
 	f = openlib(lib, incs)
 	match bio.getc(f)
 	| `std.Some 'U': /* nothing */
-	| `std.Some _:	std.fatal(1, "library %s is not usefile\n", lib)
-	| `std.None:	std.fatal(1, "library %s is not usefile\n", lib)
+	| `std.Some _:	std.fatal(1, "library %s: corrupt or invalid usefile\n", lib)
+	| `std.None:	std.fatal(1, "library %s: could not read usefile\n", lib)
 	;;
 	std.slfree(rdstr(f))
 	done = false