55 lines
2.2 KiB
Java
55 lines
2.2 KiB
Java
|
package o;
|
||
|
|
||
|
import java.lang.Thread;
|
||
|
import java.util.Iterator;
|
||
|
import java.util.List;
|
||
|
import java.util.ServiceLoader;
|
||
|
import kotlinx.coroutines.CoroutineExceptionHandler;
|
||
|
import o.C13395fZS;
|
||
|
|
||
|
/* renamed from: o.geS, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes.dex */
|
||
|
public final class C15003geS {
|
||
|
private static final List<CoroutineExceptionHandler> c = C14964gdG.e(C14964gdG.b(ServiceLoader.load(CoroutineExceptionHandler.class, CoroutineExceptionHandler.class.getClassLoader()).iterator()));
|
||
|
|
||
|
public static final void a(InterfaceC14912gbn interfaceC14912gbn, Throwable th) {
|
||
|
RuntimeException runtimeException;
|
||
|
Iterator<CoroutineExceptionHandler> it = c.iterator();
|
||
|
while (it.hasNext()) {
|
||
|
try {
|
||
|
it.next().handleException(interfaceC14912gbn, th);
|
||
|
} catch (Throwable th2) {
|
||
|
Thread currentThread = Thread.currentThread();
|
||
|
Thread.UncaughtExceptionHandler uncaughtExceptionHandler = currentThread.getUncaughtExceptionHandler();
|
||
|
if (th == th2) {
|
||
|
runtimeException = th;
|
||
|
} else {
|
||
|
runtimeException = new RuntimeException("Exception while trying to handle coroutine exception", th2);
|
||
|
C14957gcv.e(runtimeException, "");
|
||
|
C14957gcv.e(th, "");
|
||
|
if (runtimeException != th) {
|
||
|
C14887gbC.c.d(runtimeException, th);
|
||
|
}
|
||
|
}
|
||
|
uncaughtExceptionHandler.uncaughtException(currentThread, runtimeException);
|
||
|
}
|
||
|
}
|
||
|
Thread currentThread2 = Thread.currentThread();
|
||
|
try {
|
||
|
C13395fZS.IeS ieS = C13395fZS.b;
|
||
|
C15046gff c15046gff = new C15046gff(interfaceC14912gbn);
|
||
|
C14957gcv.e(th, "");
|
||
|
C14957gcv.e(c15046gff, "");
|
||
|
if (th != c15046gff) {
|
||
|
C14887gbC.c.d(th, c15046gff);
|
||
|
}
|
||
|
C13395fZS.a(C14866gag.c);
|
||
|
} catch (Throwable th3) {
|
||
|
C13395fZS.IeS ieS2 = C13395fZS.b;
|
||
|
C14957gcv.e(th3, "");
|
||
|
C13395fZS.a(new C13395fZS.LWm(th3));
|
||
|
}
|
||
|
currentThread2.getUncaughtExceptionHandler().uncaughtException(currentThread2, th);
|
||
|
}
|
||
|
}
|