Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework deserialization errors #1443

Closed
wants to merge 2 commits into from
Closed

Rework deserialization errors #1443

wants to merge 2 commits into from

Conversation

fuzzypixelz
Copy link
Member

@fuzzypixelz fuzzypixelz commented Sep 18, 2024

This pull request unifies the error types used in deserialization:

  • ZDeserializeError
  • DidntRead (wasn't exposed anyway)
  • ZReadOrDeserializeError (wasn't exposed anyway)
  • ZReadOrDeserializeErrorTuple2 (wasn't exposed anyway)
  • ZReadOrDeserializeErrorTuple3 (wasn't exposed anyway)
  • ZReadOrDeserializeErrorTuple3 (wasn't exposed anyway)
  • ZReadOrDeserializeErrorTuple4 (wasn't exposed anyway)

All references to DidntRead are removed, and everything is merged in ZDeserializeError. All ZReadOr-ish types are removed as they expose an implementation detail (why should a caller know about Codec? I don't get any extra info from DidntRead anyway).

In the future, ZDeserializeError can have a .kind() method so that the API caller to distinguish cases.

@fuzzypixelz fuzzypixelz added the breaking-change Indicates that the issue implies a breaking change (be it at compile time or at runtime) label Sep 18, 2024
@fuzzypixelz fuzzypixelz self-assigned this Sep 18, 2024
@fuzzypixelz fuzzypixelz changed the title Hide zenoh_buffers::reader::DidntRead Rwork deserialization errors Sep 18, 2024
@fuzzypixelz fuzzypixelz changed the title Rwork deserialization errors Rework deserialization errors Sep 18, 2024
@Mallets
Copy link
Member

Mallets commented Sep 18, 2024

Superseded by #1447

@Mallets Mallets closed this Sep 18, 2024
@fuzzypixelz fuzzypixelz deleted the hide-didnt-read branch October 8, 2024 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Indicates that the issue implies a breaking change (be it at compile time or at runtime)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants