wgtmac commented on code in PR #358:
URL: https://github.com/apache/iceberg-cpp/pull/358#discussion_r2570366179
##########
src/iceberg/pending_update.h:
##########
@@ -89,6 +116,51 @@ class ICEBERG_EXPORT PendingUpdateTyped : public
PendingUpdate {
protected:
PendingUpdateTyped() = default;
+
+ /// \brief Add a validation error to be returned later
+ ///
+ /// Errors are accumulated and will be returned by Apply() or Commit().
+ /// This allows builder methods to continue and collect all errors rather
+ /// than failing fast on the first error.
+ ///
+ /// \param kind The kind of error
+ /// \param message The error message
+ void AddError(ErrorKind kind, std::string message) {
+ errors_.emplace_back(kind, std::move(message));
+ }
Review Comment:
nit: we can add `void AddError(Error err)` to directly add an existing error
without change.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]