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: [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]