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

feat: improve errors in swift #116

Merged
merged 5 commits into from
Feb 10, 2025
Merged

Conversation

DominicGBauer
Copy link
Contributor

@DominicGBauer DominicGBauer commented Feb 7, 2025

Description

This is derived from #115

  • It includes adding @throws annotation accompanied by a PowerSyncException to methods so that errors can be handled in Swift.
  • All public-facing methods will now throw a PowerSyncException
  • It removes SQL logging from the native driver so that we can better control what users see
  • Errors in SyncStream have been improved to only show the error message so that users are not exposed to unnecessary error information

Testing

I've run this in Swift to confirm errors can now be handled on the Swift side and that errors are still thrown as they were previously on the Kotlin side.

@DominicGBauer DominicGBauer self-assigned this Feb 8, 2025
@DominicGBauer DominicGBauer merged commit 0c38635 into main Feb 10, 2025
3 checks passed
@DominicGBauer DominicGBauer deleted the kpgalligan-kpg/thrown-errors branch February 10, 2025 07:07
@DominicGBauer DominicGBauer mentioned this pull request Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants