浏览代码

core: print line for include_file errors

- easier to localize the error, reported by Raul Alexis Betancor Santana
(cherry picked from commit 2b680bde0605cbc1cb4840105fafc83a2a235ec5)
Daniel-Constantin Mierla 15 年之前
父节点
当前提交
d9a4c3b4ae
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      cfg.lex

+ 3 - 0
cfg.lex

@@ -1202,7 +1202,10 @@ EAT_ABLE	[\ \t\b\r]
 <INCLF>[ \t]*      /* eat the whitespace */
 <INCLF>[^ \t\n]+   { /* get the include file name */
 				if(sr_push_yy_state(yytext)<0)
+				{
+					LOG(L_CRIT, "error at %s line %d\n", (finame)?finame:"cfg", line);
 					exit(-1);
+				}
 				BEGIN(INITIAL);
 }