MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / IncrementIterations

Method IncrementIterations

eval/eval/evaluator_core.h:272–282  ·  view source on GitHub ↗

Increment iterations and return an error if the iteration budget is exceeded

Source from the content-addressed store, hash-verified

270 // Increment iterations and return an error if the iteration budget is
271 // exceeded
272 absl::Status IncrementIterations() {
273 if (max_iterations_ == 0) {
274 return absl::OkStatus();
275 }
276 iterations_++;
277 if (iterations_ >= max_iterations_) {
278 return absl::Status(absl::StatusCode::kInternal,
279 "Iteration budget exceeded");
280 }
281 return absl::OkStatus();
282 }
283
284 protected:
285 const cel::ActivationInterface* absl_nonnull activation_;

Callers 4

Evaluate1UnknownMethod · 0.80
Evaluate1KnownMethod · 0.80
Evaluate2Method · 0.80
Evaluate1Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected