-
Notifications
You must be signed in to change notification settings - Fork 90
/
Copy pathhandle-sync-errors.txt
37 lines (27 loc) · 1.06 KB
/
handle-sync-errors.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
.. _java-handle-sync-errors:
=============================
Handle Sync Errors - Java SDK
=============================
.. contents:: On this page
:local:
:backlinks: none
:depth: 2
:class: singlecol
You can configure an error handler to detect and respond to any errors that
occur in the Sync process. To define an error handler, pass an
:java-sdk:`ErrorHandler <io/realm/mongodb/sync/SyncSession.ErrorHandler.html>`
to the :java-sdk:`SyncConfiguration.Builder.errorHandler()
<io/realm/mongodb/sync/SyncConfiguration.Builder.html#errorHandler-io.realm.mongodb.sync.SyncSession.ErrorHandler->`
builder method:
.. tabs-realm-languages::
.. tab::
:tabid: kotlin
.. literalinclude:: /examples/generated/java/sync/ErrorHandlerTest.snippet.error-handler.kt
:language: kotlin
:copyable: false
.. tab::
:tabid: java
.. literalinclude:: /examples/generated/java/sync/ErrorHandlerTest.snippet.error-handler.java
:language: java
:copyable: false
.. include:: /includes/sync-errors-in-app-services.rst