Repository navigation
Conversation
ICEBERG_RETURN_UNEXPECTED, and through it ICEBERG_ASSIGN_OR_RAISE, named Error without its namespace. ICEBERG_PRECHECK and ICEBERG_CHECK did the same with InvalidArgument and ValidationFailed, and the ICEBERG_BUILDER_* macros with ErrorKind. Those names resolve only inside namespace iceberg, so code that includes the installed headers could not use the macros. Qualify them with ::iceberg::, as the logging macros already do, and use ::iceberg:: in the exception macros as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
shangxinli
reviewed
Oct 17, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zhjwpku
reviewed
Oct 20, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zhjwpku
approved these changes
Oct 20, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
ICEBERG_RETURN_UNEXPECTED,ICEBERG_ASSIGN_OR_RAISE,ICEBERG_PRECHECK, andICEBERG_CHECKiniceberg/util/macros.h, and theICEBERG_BUILDER_*macros iniceberg/util/error_collector.h, use with::iceberg::.iceberg::prefixes in the exception macros (ERROR_TO_EXCEPTION, used byICEBERG_THROW_NOT_OKandICEBERG_ASSIGN_OR_THROW) to::iceberg::, as the logging macros already do.error_macros_test.cc, which uses each of these macros from code outside namespace iceberg.Why
The macros named
Error,InvalidArgument,ValidationFailed, andErrorKindwithout 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_RAISEin 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_testpasses (419 tests), including the newErrorMacrosTestcases forICEBERG_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_testpasses (10 tests), which also compiles the bundle library against the changed headers.🤖 Generated with Claude Code