Add StackOverflowError to RxJava's error handler (#408)

This commit is contained in:
Rafał Borcz 2019-06-07 21:38:53 +02:00 committed by Mikołaj Pich
parent 58d5e4da0e
commit ed6a0f8cd0

View File

@ -66,8 +66,10 @@ class WulkanowyApp : DaggerApplication() {
}
private fun onError(error: Throwable) {
if (error is UndeliverableException && error.cause is IOException || error.cause is InterruptedException) {
Timber.e(error.cause, "An undeliverable error occurred")
//RxJava's too deep stack traces may cause SOE on older android devices
val cause = error.cause
if (error is UndeliverableException && cause is IOException || cause is InterruptedException || cause is StackOverflowError) {
Timber.e(cause, "An undeliverable error occurred")
} else throw error
}