mirror of
https://github.com/falcosecurity/falco.git
synced 2025-07-01 17:12:21 +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
1db2339ece
commit
bef628dc05
@ -273,7 +273,7 @@ function compiler.compile_macro(line, list_defs)
|
|||||||
local ast, error_msg = parser.parse_filter(line)
|
local ast, error_msg = parser.parse_filter(line)
|
||||||
|
|
||||||
if (error_msg) then
|
if (error_msg) then
|
||||||
print ("Compilation error: ", error_msg)
|
print ("Compilation error when compiling \""..line.."\": ", error_msg)
|
||||||
error(error_msg)
|
error(error_msg)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -298,7 +298,7 @@ function compiler.compile_filter(name, source, macro_defs, list_defs)
|
|||||||
local ast, error_msg = parser.parse_filter(source)
|
local ast, error_msg = parser.parse_filter(source)
|
||||||
|
|
||||||
if (error_msg) then
|
if (error_msg) then
|
||||||
print ("Compilation error: ", error_msg)
|
print ("Compilation error when compiling \""..source.."\": ", error_msg)
|
||||||
error(error_msg)
|
error(error_msg)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user