construct Ditto Fallible
Deprecated
Use Ditto.open() instead, providing the coreExceptionBridgingEnabled via DittoConfig.experimental.
Replace with
Ditto.open(config)Constructs a Ditto instance in a new way that prevents a crash if the rust core has a problem obtaining a lock on the persistence directory. Should an issue occur, this method instead throws a DittoError.
Parameters
sets whether core crashes (panics) should be raised as JVM exceptions. To get a full readable stack trace from the core crash, you need to ensure debug symbols are not stripped during the build. You can do that from gradle:
android {
...
packagingOptions{
jniLibs {
useLegacyPackaging = true
keepDebugSymbols.add("**\/libdittoffi.so")
}
}
}Whilst enabling coreExceptionBridging, in and of itself, does not affect binary size nor performance, do note that keeping the debug symbols (as shown) ought only to be done for Debug builds, since it may result in an increase of the size of the app by ~30MB.