-
Notifications
You must be signed in to change notification settings - Fork 171
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
Propagate error code in case of client reset errors in the callback #7148
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nicola-cab
force-pushed
the
nc/fix_callback_failed_for_client_reset
branch
from
November 17, 2023 15:56
4011f5f
to
96cd419
Compare
nicola-cab
commented
Nov 20, 2023
Pull Request Test Coverage Report for Build nicola.cabiddu_1195
💛 - Coveralls |
This was referenced Nov 22, 2023
nicola-cab
requested review from
jbreams
and removed request for
danieltabacaru
November 22, 2023 12:45
jbreams
requested changes
Nov 22, 2023
nicola-cab
force-pushed
the
nc/fix_callback_failed_for_client_reset
branch
from
December 5, 2023 16:55
9e8fe78
to
351fbf2
Compare
jbreams
approved these changes
Dec 6, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What, How & Why?
When there is an error (an exception) thrown inside user code callbacks, we usually provide some hooks for the SDKs in order to register a message for the exception just thrown and retrieve it back once core stops executing the callback.
This was done for
realm_config_set_migration_function
,realm_config_set_data_initialization_function
andrealm_config_set_should_compact_on_launch_function
but not for the 2 client reset callbacks.In this case, the code is more completed because it is embedded inside the client reset logic and the session machinery. I have drafted a possible implementation in order to propagate possible errors happening inside user code callbacks while client reset is running.
Fixes: #7098
☑️ ToDos
bindgen/spec.yml
, if public C++ API changed