construct Ditto Fallible
fun constructDittoFallible(dependencies: DittoDependencies, identity: DittoIdentity = OfflinePlayground(dependencies), coreExceptionBridgingEnabled: Boolean = false): Ditto
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
core Exception Bridging Enabled
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")
}
}
}Content copied to clipboard
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.