mirror of
https://github.com/falcosecurity/falco.git
synced 2025-08-02 06:52:10 +00:00
update(engine): temporary replace for error messages
Signed-off-by: Luca Guerra <luca@guerra.sh>
This commit is contained in:
parent
8a7ef687b1
commit
4c023b0d93
@ -191,7 +191,8 @@ void rule_loader::collector::append(configuration& cfg, list_info& info)
|
||||
{
|
||||
auto prev = m_list_infos.at(info.name);
|
||||
THROW(!prev,
|
||||
"List has 'append' key or an append override but no list by that name already exists",
|
||||
// "List has 'append' key or an append override but no list by that name already exists", // TODO update this error and update testing
|
||||
"List has 'append' key but no list by that name already exists",
|
||||
info.ctx);
|
||||
prev->items.insert(prev->items.end(), info.items.begin(), info.items.end());
|
||||
append_info(prev, info, m_cur_index++);
|
||||
@ -244,10 +245,12 @@ void rule_loader::collector::append(configuration& cfg, rule_update_info& info)
|
||||
auto prev = m_rule_infos.at(info.name);
|
||||
|
||||
THROW(!prev,
|
||||
"Rule has 'append' key or an append override but no rule by that name already exists",
|
||||
// "Rule has 'append' key or an append override but no rule by that name already exists", // TODO replace with this and update testing
|
||||
"Rule has 'append' key but no rule by that name already exists",
|
||||
info.ctx);
|
||||
THROW(!info.has_any_value(),
|
||||
"Appended rule must have at least one field that can be appended to",
|
||||
"Appended rule must have exceptions or condition property",
|
||||
// "Appended rule must have at least one field that can be appended to", // TODO replace with this and update testing
|
||||
info.ctx);
|
||||
|
||||
// note: source can be nullptr in case we've collected a
|
||||
|
@ -663,9 +663,10 @@ static void read_item(
|
||||
read_rule_exceptions(item, v.exceptions, ctx, true);
|
||||
}
|
||||
|
||||
THROW((!v.cond.has_value() && !v.exceptions.has_value()),
|
||||
"Appended rule must have exceptions or condition property",
|
||||
v.ctx);
|
||||
// TODO restore this error and update testing
|
||||
//THROW((!v.cond.has_value() && !v.exceptions.has_value()),
|
||||
// "Appended rule must have exceptions or condition property",
|
||||
// v.ctx);
|
||||
|
||||
collector.append(cfg, v);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user