mirror of
https://github.com/ankidroid/Anki-Android.git
synced 2024-09-20 12:02:16 +02:00
parent
deb3a539ec
commit
065b0d0ea2
@ -42,6 +42,8 @@ fun AnkiActivity.launchCatchingTask(
|
||||
return lifecycle.coroutineScope.launch {
|
||||
try {
|
||||
block()
|
||||
} catch (exc: CancellationException) {
|
||||
// do nothing
|
||||
} catch (exc: BackendInterruptedException) {
|
||||
Timber.e("caught: %s", exc)
|
||||
showSimpleSnackbar(this@launchCatchingTask, exc.localizedMessage, false)
|
||||
|
Loading…
Reference in New Issue
Block a user