diff directive.c @ 90:594495750d84

If we get a malformed #include, print it. (both before and after macro expansion) This way the user has a fighting chance of figuring out what happened.
author David A. Holland
date Mon, 10 Jun 2013 22:00:06 -0400
parents 3e505c16b0b0
children 60184aa42604
line wrap: on
line diff
--- a/directive.c	Mon Jun 10 21:57:50 2013 -0400
+++ b/directive.c	Mon Jun 10 22:00:06 2013 -0400
@@ -384,8 +384,10 @@
 		dostrfree(text);
 		return;
 	}
+	complain(p, "Illegal #include directive");
+	complain(p, "Before macro expansion: #include %s", line);
+	complain(p, "After macro expansion: #include %s", text);
 	dostrfree(text);
-	complain(p, "Illegal #include directive");
 	complain_fail();
 }