zhjwpku commented on code in PR #81: URL: https://github.com/apache/iceberg-cpp/pull/81#discussion_r2049964913
########## src/iceberg/result.h: ########## @@ -78,4 +78,12 @@ auto JsonParseError(const std::format_string<Args...> fmt, Args&&... args) .message = std::format(fmt, std::forward<Args>(args)...)}); } +/// \brief Create an unexpected error with kInvalidExpression +template <typename... Args> +auto InvalidExpressionError(const std::format_string<Args...> fmt, Args&&... args) + -> unexpected<Error> { + return unexpected<Error>({.kind = ErrorKind::kInvalidExpression, + .message = std::format(fmt, std::forward<Args>(args)...)}); +} + Review Comment: Should we add an Error wrapper for each ErrorKind? I'd suggest including all those in this PR if needed. #80 might need NoSuchNamespaceError. -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org