Include condition in compilation errors.

When a macro/rule condition can't be compiled, include the condition in
the error message.
This commit is contained in:
Mark Stemm 2016-09-08 16:15:10 -07:00
parent fbcddba06a
commit 33b9ef5d50

View File

@ -273,7 +273,7 @@ function compiler.compile_macro(line, list_defs)
local ast, error_msg = parser.parse_filter(line)
if (error_msg) then
print ("Compilation error: ", error_msg)
print ("Compilation error when compiling \""..line.."\": ", error_msg)
error(error_msg)
end
@ -298,7 +298,7 @@ function compiler.compile_filter(name, source, macro_defs, list_defs)
local ast, error_msg = parser.parse_filter(source)
if (error_msg) then
print ("Compilation error: ", error_msg)
print ("Compilation error when compiling \""..source.."\": ", error_msg)
error(error_msg)
end