refactor(error): add typed error code enum to messaging_error_category (#220)#235
Merged
Merged
Conversation
…y (Issue #220) Add a `codes` enum inside `messaging_error_category` that mirrors all constexpr int error codes from error_codes.h, following the same pattern as common_system's `common_error_category::codes`. This enables type-safe error code construction: auto ec = make_typed_error_code(messaging_error_category::queue_full); return Result<int>::err(ec); Changes: - Add `codes` enum with all 46 messaging error codes grouped by category - Add `make_typed_error_code(messaging_error_category::codes)` overload - Add 7 new unit tests covering enum values, Result<T> integration, cross-construction equivalence, and cross-category inequality - Update header documentation with new usage examples The existing constexpr int error codes and make_messaging_error_code() remain unchanged for backward compatibility.
27 tasks
Owner
Author
CI/CD Failure AnalysisAnalysis Time: 2026-02-14 UTC Failed Workflows
Root Cause AnalysisPrimary Error: Analysis:
The Evidence this is pre-existing:
Action TakenRe-triggered the failed workflow. The flaky test should pass on retry. Automated failure analysis - Attempt #1 |
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.
Closes #220
Summary
codesenum insidemessaging_error_categorythat mirrors all 46 constexpr int error codes fromerror_codes.hmake_typed_error_code(messaging_error_category::codes)overload for type-safe error code constructionContext
This completes the remaining phases of Issue #220:
codesenumconstexpr intcodes andmake_messaging_error_code()remain unchangedDesign
Follows the same pattern as
common_error_category::codes:The
codesenum uses unscopedenum codes : int(notenum class) so values are accessible directly asmessaging_error_category::queue_fullwithout the extracodes::qualifier.Test Plan
typed_error_codeobjects