Skip to content

refactor(zenoh): Replace bool returns with structured error codes #42

@zhexuany

Description

@zhexuany

Refactoring Task

Replace bool returns with structured errors (std::expected or error codes).

Motivation

Current API uses bool for error reporting which doesn't distinguish between error types: Connection failures, Invalid configuration, Subscription failures, State transition errors.

Proposed Solution

Use C++23 std::expected or custom Result type.

Breaking Changes

Yes - API will change

Files to Modify

  • middlewares/zenoh/src/zenoh_plugin/include/zenoh_plugin.hpp
  • middlewares/zenoh/src/zenoh_plugin/src/zenoh_plugin.cpp

Priority

Medium - Improves debugging and error handling

Metadata

Metadata

Assignees

No one assigned

    Labels

    breakingBreaking changescppC++ codeenhancementNew feature or requestzenohZenoh plugin code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions