Handle OOM for whatever reasons
This commit is contained in:
@@ -57,15 +57,15 @@ object MacLookup {
|
|||||||
nickname = result
|
nickname = result
|
||||||
macLookupPending = false
|
macLookupPending = false
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
|
||||||
Timber.d(e)
|
|
||||||
if (explicit) SmartSnackbar.make(e).show()
|
|
||||||
} catch (e: JSONException) {
|
} catch (e: JSONException) {
|
||||||
if ((e as? UnexpectedError)?.error == "no result") {
|
if ((e as? UnexpectedError)?.error == "no result") {
|
||||||
// no vendor found, we should not retry in the future
|
// no vendor found, we should not retry in the future
|
||||||
AppDatabase.instance.clientRecordDao.upsert(mac) { macLookupPending = false }
|
AppDatabase.instance.clientRecordDao.upsert(mac) { macLookupPending = false }
|
||||||
} else Timber.w(e)
|
} else Timber.w(e)
|
||||||
if (explicit) SmartSnackbar.make(e).show()
|
if (explicit) SmartSnackbar.make(e).show()
|
||||||
|
} catch (e: Throwable) {
|
||||||
|
Timber.d(e)
|
||||||
|
if (explicit) SmartSnackbar.make(e).show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user