fix(userspace/engine): catch YAML parsing and validation errors with right context

Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
This commit is contained in:
Jason Dellaluce
2023-01-09 17:30:49 +00:00
committed by poiana
parent 1b2c7ef7d9
commit d79d7112a0
3 changed files with 38 additions and 5 deletions

View File

@@ -64,6 +64,11 @@ rule_loader::context::context(const YAML::Node &item,
init(parent.name(), position(item.Mark()), item_type, item_name, parent);
}
rule_loader::context::context(const YAML::Mark &mark, const context& parent)
{
init(parent.name(), position(mark), item_type::VALUE_FOR, "", parent);
}
rule_loader::context::context(const libsinsp::filter::ast::pos_info& pos,
const std::string& condition,
const context& parent)