package androidx.compose.runtime;

import V4.A;
import V4.C0787z;
import androidx.compose.runtime.tooling.CompositionErrorContextImpl;

/* JADX INFO: loaded from: classes.dex */
public final class RememberedCoroutineScope$special$$inlined$CoroutineExceptionHandler$1 extends A4.a implements A {
    final /* synthetic */ CompositionErrorContextImpl $traceContext$inlined;
    final /* synthetic */ RememberedCoroutineScope this$0;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public RememberedCoroutineScope$special$$inlined$CoroutineExceptionHandler$1(C0787z c0787z, CompositionErrorContextImpl compositionErrorContextImpl, RememberedCoroutineScope rememberedCoroutineScope) {
        super(c0787z);
        this.$traceContext$inlined = compositionErrorContextImpl;
        this.this$0 = rememberedCoroutineScope;
    }

    @Override // V4.A
    public void handleException(A4.j jVar, Throwable th) throws Throwable {
        this.$traceContext$inlined.attachComposeStackTrace(th, this.this$0);
        A4.j jVar2 = this.this$0.overlayContext;
        C0787z c0787z = C0787z.f8352a;
        A a6 = (A) jVar2.get(c0787z);
        if (a6 != null) {
            a6.handleException(jVar, th);
            return;
        }
        A a7 = (A) this.this$0.parentContext.get(c0787z);
        if (a7 == null) {
            throw th;
        }
        a7.handleException(jVar, th);
    }
}
