| 1711 | } |
| 1712 | |
| 1713 | void SetRecursiveStep(std::unique_ptr<DirectExpressionStep> step, int depth) { |
| 1714 | if (!progress_status_.ok() || PlanningSuppressed()) { |
| 1715 | return; |
| 1716 | } |
| 1717 | if (program_builder_.current() == nullptr) { |
| 1718 | SetProgressStatusError(absl::InternalError( |
| 1719 | "CEL AST traversal out of order in flat_expr_builder.")); |
| 1720 | return; |
| 1721 | } |
| 1722 | program_builder_.current()->set_recursive_program(std::move(step), depth); |
| 1723 | if (depth > max_recursion_depth_) { |
| 1724 | SetProgressStatusError(absl::InvalidArgumentError( |
| 1725 | absl::StrCat("Maximum recursion depth of ", |
| 1726 | options_.max_recursion_depth, " exceeded"))); |
| 1727 | } |
| 1728 | } |
| 1729 | |
| 1730 | void SetProgressStatusError(const absl::Status& status) { |
| 1731 | if (progress_status_.ok() && !status.ok()) { |
nothing calls this directly
no test coverage detected