Skip to content

refactor: finish Result<T> migration (75-80% → 100%) #988

Description

@kcenon

What

Result<T> migration is documented as 75-80% complete. Finish the remaining public API paths so the library has a single, consistent error-handling style.

  • Current: Mixed exception + Result in public API
  • Expected: 100% Result in public API; exceptions only at internal boundaries with adapters
  • Scope: include/kcenon/network/**, src/**

Why

  • Mixed error styles force consumers to handle both exceptions and Result
  • Ecosystem convention (common_system, logger_system) is Result for public APIs
  • Blocks v1.0 API freeze

How

Technical Approach

  1. Inventory remaining throw statements in public headers
  2. Convert each to Result or document as internal-only with a throwing-to-Result adapter
  3. Update examples and docs
  4. Add a static check (grep or clang-tidy) that fails if a public header contains throw

Acceptance Criteria

  • No throw in public headers
  • All examples use Result
  • Static check enforced in CI
  • CHANGELOG entry describing the breaking change

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions