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

Fix a bunch of throw statements to use Realm exceptions #7141

Merged
merged 9 commits into from
Nov 27, 2023

Conversation

michael-wb
Copy link
Contributor

@michael-wb michael-wb commented Nov 15, 2023

What, How & Why?

Replace instances of std::exception based throws to use the Realm exception classes in the Sync Client.

This pull request was copied from @jbreams changes in PR #6558. Added a few more exceptions and updated to latest master.

Fixes #6255

☑️ ToDos

  • 📝 Changelog update
  • 🚦 Tests (or not relevant)
  • [ ] C-API, if public C++ API changed
  • [ ] bindgen/spec.yml, if public C++ API changed

Copy link

coveralls-official bot commented Nov 15, 2023

Pull Request Test Coverage Report for Build michael.wilkersonbarker_932

  • 2 of 77 (2.6%) changed or added relevant lines in 7 files are covered.
  • 106 unchanged lines in 18 files lost coverage.
  • Overall coverage decreased (-0.03%) to 91.669%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/realm/sync/noinst/client_reset_recovery.cpp 0 2 0.0%
src/realm/sync/noinst/migration_store.cpp 0 2 0.0%
src/realm/object-store/sync/sync_manager.cpp 0 4 0.0%
src/realm/object-store/sync/impl/sync_file.cpp 0 14 0.0%
src/realm/sync/subscriptions.cpp 1 15 6.67%
src/realm/sync/noinst/sync_metadata_schema.cpp 0 39 0.0%
Files with Coverage Reduction New Missed Lines %
src/realm/sync/noinst/client_impl_base.hpp 1 93.91%
src/realm/sync/noinst/migration_store.cpp 1 95.86%
test/test_index_string.cpp 1 94.13%
test/util/compare_groups.cpp 1 54.74%
src/realm/db.cpp 2 93.72%
test/test_lang_bind_helper.cpp 2 93.3%
src/realm/sort_descriptor.cpp 3 93.7%
src/realm/sync/network/network.cpp 3 89.86%
src/realm/sync/noinst/client_impl_base.cpp 3 85.48%
test/test_thread.cpp 3 66.67%
Totals Coverage Status
Change from base Build 1872: -0.03%
Covered Lines: 231843
Relevant Lines: 252914

💛 - Coveralls

Copy link
Collaborator

@danieltabacaru danieltabacaru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work

@michael-wb
Copy link
Contributor Author

Nice work

It was all @jbreams! Thank you!

@michael-wb michael-wb merged commit bc48709 into master Nov 27, 2023
31 of 32 checks passed
@michael-wb michael-wb deleted the mwb/fix_exception_types branch November 27, 2023 21:40
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Exception unification] std::logic_error thrown in get_flx_subscription_store
5 participants