manuzhang opened a new pull request, #1026: URL: https://github.com/apache/iceberg-cpp/pull/1026
## What - Qualify the Iceberg names that `ICEBERG_RETURN_UNEXPECTED`, `ICEBERG_ASSIGN_OR_RAISE`, `ICEBERG_PRECHECK`, and `ICEBERG_CHECK` in `iceberg/util/macros.h`, and the `ICEBERG_BUILDER_*` macros in `iceberg/util/error_collector.h`, use with `::iceberg::`. - Change the `iceberg::` prefixes in the exception macros (`ERROR_TO_EXCEPTION`, used by `ICEBERG_THROW_NOT_OK` and `ICEBERG_ASSIGN_OR_THROW`) to `::iceberg::`, as the logging macros already do. - Add `error_macros_test.cc`, which uses each of these macros from code outside namespace iceberg. ## Why The macros named `Error`, `InvalidArgument`, `ValidationFailed`, and `ErrorKind` without their namespace. Those names resolve only in code inside namespace iceberg, so an application that includes the installed headers could not use the macros. For example, `ICEBERG_ASSIGN_OR_RAISE` in an application failed with `'Error' was not declared in this scope`. ## Behavior change Code outside namespace iceberg can now use these macros. Code inside namespace iceberg compiles and behaves as before, because the qualified names refer to the same functions and types. ## Testing - `util_test` passes (419 tests), including the new `ErrorMacrosTest` cases for `ICEBERG_ASSIGN_OR_RAISE`, `ICEBERG_RETURN_UNEXPECTED`, `ICEBERG_PRECHECK`, `ICEBERG_CHECK`, `ICEBERG_ASSIGN_OR_THROW`, and the builder macros. The new test file does not compile against the previous headers. - `metadata_table_test` passes (10 tests), which also compiles the bundle library against the changed headers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
