Increment iterations and return an error if the iteration budget is exceeded
| 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_; |
no outgoing calls
no test coverage detected