| 2192 | /// \brief Convenience function: raise an error if matches is empty. |
| 2193 | template <typename T> |
| 2194 | Status CheckNonEmpty(const std::vector<FieldPath>& matches, const T& root) const { |
| 2195 | if (matches.empty()) { |
| 2196 | return Status::Invalid("No match for ", ToString(), " in ", root.ToString()); |
| 2197 | } |
| 2198 | return Status::OK(); |
| 2199 | } |
| 2200 | |
| 2201 | /// \brief Convenience function: raise an error if matches contains multiple FieldPaths. |
| 2202 | template <typename T> |