34 lines
1.4 KiB
Java
34 lines
1.4 KiB
Java
package s.a;
|
|
|
|
import d0.b;
|
|
import d0.f0.n;
|
|
import d0.f0.q;
|
|
import java.lang.Thread;
|
|
import java.util.List;
|
|
import kotlin.coroutines.CoroutineContext;
|
|
import kotlinx.coroutines.CoroutineExceptionHandler;
|
|
/* compiled from: CoroutineExceptionHandlerImpl.kt */
|
|
public final class a0 {
|
|
public static final List<CoroutineExceptionHandler> a = q.toList(n.asSequence(a.b()));
|
|
|
|
public static final void a(CoroutineContext coroutineContext, Throwable th) {
|
|
Throwable th2;
|
|
for (CoroutineExceptionHandler coroutineExceptionHandler : a) {
|
|
try {
|
|
coroutineExceptionHandler.handleException(coroutineContext, th);
|
|
} catch (Throwable th3) {
|
|
Thread currentThread = Thread.currentThread();
|
|
Thread.UncaughtExceptionHandler uncaughtExceptionHandler = currentThread.getUncaughtExceptionHandler();
|
|
if (th == th3) {
|
|
th2 = th;
|
|
} else {
|
|
th2 = new RuntimeException("Exception while trying to handle coroutine exception", th3);
|
|
b.addSuppressed(th2, th);
|
|
}
|
|
uncaughtExceptionHandler.uncaughtException(currentThread, th2);
|
|
}
|
|
}
|
|
Thread currentThread2 = Thread.currentThread();
|
|
currentThread2.getUncaughtExceptionHandler().uncaughtException(currentThread2, th);
|
|
}
|
|
}
|