constructDittoFallible

fun constructDittoFallible(dependencies: DittoDependencies, identity: DittoIdentity = OfflinePlayground(dependencies)): 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.

Throws

if there was a problem constructing the Ditto instance.

if the given persistence directory is in use by another Ditto instance.