mirror of
https://github.com/falcosecurity/falco.git
synced 2025-06-29 08:07:24 +00:00
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:
parent
fbcddba06a
commit
33b9ef5d50
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user