Ignores out of memory exceptions because the stack trace is irrelevant in those cases.

This commit is contained in:
Vitor Pamplona
2025-08-29 09:35:05 -04:00
parent aaae806505
commit 3b59b11e8b

View File

@@ -33,8 +33,11 @@ class UnexpectedCrashSaver(
t: Thread,
e: Throwable,
) {
scope.launch {
cache.writeReport(ReportAssembler().buildReport(e))
if (e !is OutOfMemoryError) {
// OOM reports are junk
scope.launch {
cache.writeReport(ReportAssembler().buildReport(e))
}
}
defaultUEH!!.uncaughtException(t, e)
}