package kotlinx.coroutines.internal;

import d2.h1;

/* JADX INFO: compiled from: MainDispatchers.kt */
/* JADX INFO: loaded from: classes.dex */
final class v extends h1 implements d2.g0 {

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    private final Throwable f5238f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    private final String f5239g;

    public v(Throwable th, String str) {
        this.f5238f = th;
        this.f5239g = str;
    }

    private final Void q() {
        String strJ;
        if (this.f5238f == null) {
            u.d();
            throw new k1.c();
        }
        String str = this.f5239g;
        String str2 = "";
        if (str != null && (strJ = w1.g.j(". ", str)) != null) {
            str2 = strJ;
        }
        throw new IllegalStateException(w1.g.j("Module with the Main dispatcher had failed to initialize", str2), this.f5238f);
    }

    @Override // d2.u
    public boolean g(n1.f fVar) {
        q();
        throw new k1.c();
    }

    @Override // d2.h1
    public h1 j() {
        return this;
    }

    @Override // d2.u
    /* JADX INFO: renamed from: p, reason: merged with bridge method [inline-methods] */
    public Void d(n1.f fVar, Runnable runnable) {
        q();
        throw new k1.c();
    }

    @Override // d2.h1, d2.u
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("Dispatchers.Main[missing");
        Throwable th = this.f5238f;
        sb.append(th != null ? w1.g.j(", cause=", th) : "");
        sb.append(']');
        return sb.toString();
    }
}
