Repository navigation
fix(ComponentsStorage): name the component type and check deletion of unknown ids - #1376
Conversation
Cpp-Linter Report
|
28a0d46 to
da555af
Compare
… unknown ids Follow-up of 56952bf (single lookup and explicit error for unknown component): - the unknown component message names the component type: "[ComponentsStorage] Fault with id <uuid> does not exist", useful when the same uuid is looked up in several component collections; - delete_component erased components_.find(id) without checking it, undefined behavior for an unknown id; it now throws the same exception. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
da555af to
b96df52
Compare
|
🎉 This PR is included in version 19.1.0-rc.8 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 19.1.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Follow-up of #1371 (56952bf, single lookup and explicit error for unknown component). This branch was rebased on
nextand only keeps what #1371 does not cover:[ComponentsStorage] Fault with id <uuid> does not existinstead ofComponent with id <uuid> does not exist. Useful when the same uuid is looked up in several component collections, and in Python where the exception is the only hint.delete_componentchecks the id: it erasedcomponents_.find(id)without checking it, which is undefined behavior for an unknown id. It now throws the same exception.Tests
test-brep:test_remove_unknown_component, which checks thatremove_surfaceswith an unknown id throws an exception naming the type and the id, and leaves the model unchanged.test-py-brep:test_unknown_component_access, which checks the message seen from Python.Full suite passes locally.
Related: Geode-solutions/OpenGeode-Geosciences#204 (same branch name), which removes the uuid overloads of the geological setters.
🤖 Generated with Claude Code