Suppress cancellation exception

This commit is contained in:
Mygod
2023-02-21 11:01:09 -05:00
parent a7bcb21d96
commit b380947bc3

View File

@@ -8,6 +8,7 @@ import be.mygod.vpnhotspot.R
import be.mygod.vpnhotspot.room.AppDatabase
import be.mygod.vpnhotspot.util.connectCancellable
import be.mygod.vpnhotspot.widget.SmartSnackbar
import kotlinx.coroutines.CancellationException
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.Job
@@ -117,6 +118,7 @@ object MacLookup {
if (result != null) nickname = result
macLookupPending = false
}
} catch (_: CancellationException) {
} catch (e: Throwable) {
Timber.w(e)
if (explicit) SmartSnackbar.make(e).show()