package d.f.a.r2.i3;

import android.os.Looper;
import java.lang.Thread;

/* JADX INFO: compiled from: Cockroach.java */
/* JADX INFO: loaded from: classes.dex */
public class b implements Thread.UncaughtExceptionHandler {
    @Override // java.lang.Thread.UncaughtExceptionHandler
    public void uncaughtException(Thread thread, Throwable th) {
        d dVar = c.f3228b;
        if (dVar != null) {
            try {
                dVar.c(thread, th);
            } catch (Throwable th2) {
                th2.printStackTrace();
            }
        }
        if (thread != Looper.getMainLooper().getThread()) {
            return;
        }
        c.c(th);
        c.d();
        throw null;
    }
}
