Source set: Android
override val snapshotObserver = OwnerSnapshotObserver { command ->
val exceptionHandler = uncaughtExceptionHandler
var command =
if (exceptionHandler != null) {
{
try {
command()
} catch (e: Exception) {
exceptionHandler.onUncaughtException(e)
}
}
} else {
command
}
if (handler?.looper === Looper.myLooper()) {
command()
} else {
handler?.post(command)
}
}