onDatabaseError
Optional callback invoked when a database error occurs during initialization. Receives the exception and a boolean indicating whether recovery will be attempted. Useful for logging, telemetry, and custom error handling.
Example:
onDatabaseError = { exception, canRecover ->
logger.error("Database error: ${exception.message}", exception)
if (!canRecover) {
showErrorDialog("Database error - please reinstall the app")
}
}Content copied to clipboard