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 sync exceptions based on new error codes. #1489

Closed
wants to merge 11 commits into from

Conversation

cmelchior
Copy link
Contributor

@cmelchior cmelchior commented Aug 23, 2023

All the old SyncClient, SyncProtocol, and SyncSession errors are gone and have been rolled up into the general RealmError struct. This PR reworks our error handling to accommodate this.

Since we are hiding the real errors behind our exception hierarchy, there should be no visible change to end users. The only exception is the exception message which might now contain different categories and codes, but the behavior should be the same.

Some notable changes:

  • A CoreError class has been added that mirrors the C struct realm_error_t.
  • CategoryFlags have been expanded and are now also used for Sync Errors where it previously was only used for local exceptions.
  • Websocket errors have been exposed as an internal enum. They are not currently used, but will be needed for the Platform Networking project.

@cmelchior cmelchior closed this Aug 25, 2023
@cmelchior
Copy link
Contributor Author

Moving to another branch

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant