Add error context while evaluating predicates
This commit is contained in:
parent
fbb734689b
commit
87ec7bc34a
1 changed files with 8 additions and 1 deletions
|
|
@ -84,8 +84,15 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator()(scope_t& item) {
|
bool operator()(scope_t& item) {
|
||||||
|
try {
|
||||||
return ! predicate || predicate.calc(item).strip_annotations(what_to_keep);
|
return ! predicate || predicate.calc(item).strip_annotations(what_to_keep);
|
||||||
}
|
}
|
||||||
|
catch (const std::exception& err) {
|
||||||
|
add_error_context(_("While determining truth of predicate expression:"));
|
||||||
|
add_error_context(expr_context(predicate));
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
string args_to_predicate_expr(value_t::sequence_t::const_iterator begin,
|
string args_to_predicate_expr(value_t::sequence_t::const_iterator begin,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue