-
Notifications
You must be signed in to change notification settings - Fork 15.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Print better error message when registering an extension with a dupli…
…cate number. Before, the upb_ExtensionRegistry_AddArray API would just return a boolean indicating whether the operation succeeded or failed. This is not descriptive enough in some cases and made the error output confusing. Specifically, when trying to register an extension with a duplicate extension number, AddArray first performs a map lookup before inserting the extension entry into the registry. The code handled lookup failure (due to duplicates) the same way as insertion failure (due to OOM), and printed an error message that showed OOM when there is a duplicate array entry. This was acknolwedged in a TODO in the AddArray code comment -- which is now fixed. :) PiperOrigin-RevId: 700764584
- Loading branch information
1 parent
5752b2d
commit 783b307
Showing
5 changed files
with
56 additions
and
24 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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