Suppress CancellationException

This commit is contained in:
Mygod
2020-07-12 07:10:40 +08:00
parent 87f2b28e5a
commit 2cce339063

View File

@@ -135,7 +135,8 @@ object TrafficRecorder {
if (!timeout && timestamp - lastUpdate <= 100) return if (!timeout && timestamp - lastUpdate <= 100) return
try { try {
doUpdate(timestamp) doUpdate(timestamp)
} catch (e: RuntimeException) { } catch (_: CancellationException) {
} catch (e: Exception) {
Timber.w(e) Timber.w(e)
SmartSnackbar.make(e).show() SmartSnackbar.make(e).show()
} }