-
Notifications
You must be signed in to change notification settings - Fork 61
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
[RKOTLIN-1096] Map is_fatal
to UnrecoverableSyncException
#1768
Conversation
|
||
ErrorCode.RLM_ERR_SYNC_PROTOCOL_INVARIANT_FAILED, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these 3 all now under Fatal UnrecoverableSyncException
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At least RLM_ERR_SYNC_PERMISSION_DENIED
isn't, but shouldn't now any fatal (unrecoverable) errors haveis_fatal
set to true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked with core, is_fatal
is a better property to identify unrecoverable errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems safest to keep this, unless you are absolutely certain that core throws the three error codes with is_fatal
set. If not we will suddenly throw them as SyncExceptions
instead.
channel.send(AssertionError("Realm was successfully opened")) | ||
} | ||
} | ||
|
||
val error = channel.receiveOrFail() | ||
assertTrue(error is UnrecoverableSyncException, "Was $error") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't there a test that checks UnrecoverableSyncException
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is the only test that mentioned UnrecoverableSyncException
. I am going to add some tests using realm_sync_session_handle_error_for_testing
24ac992
to
29c347b
Compare
2f020e6
to
29c347b
Compare
closes #1767