From 4860ca03e701d2647684aaeb8bc53dfca385a5c3 Mon Sep 17 00:00:00 2001 From: Mygod Date: Thu, 11 Jul 2019 16:14:06 +0800 Subject: [PATCH] Handle OOM for whatever reasons --- .../src/main/java/be/mygod/vpnhotspot/client/MacLookup.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/client/MacLookup.kt b/mobile/src/main/java/be/mygod/vpnhotspot/client/MacLookup.kt index 6953d9b0..654be479 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/client/MacLookup.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/client/MacLookup.kt @@ -57,15 +57,15 @@ object MacLookup { nickname = result macLookupPending = false } - } catch (e: Exception) { - Timber.d(e) - if (explicit) SmartSnackbar.make(e).show() } catch (e: JSONException) { if ((e as? UnexpectedError)?.error == "no result") { // no vendor found, we should not retry in the future AppDatabase.instance.clientRecordDao.upsert(mac) { macLookupPending = false } } else Timber.w(e) if (explicit) SmartSnackbar.make(e).show() + } catch (e: Throwable) { + Timber.d(e) + if (explicit) SmartSnackbar.make(e).show() } } }