package kotlin; import java.io.PrintWriter; import java.io.StringWriter; import kotlin.internal.PlatformImplementationsKt; import kotlin.jvm.internal.Intrinsics; /* loaded from: classes5.dex */ public abstract class ExceptionsKt__ExceptionsKt { public static String stackTraceToString(Throwable th) { Intrinsics.checkNotNullParameter(th, ""); StringWriter stringWriter = new StringWriter(); PrintWriter printWriter = new PrintWriter(stringWriter); th.printStackTrace(printWriter); printWriter.flush(); String stringWriter2 = stringWriter.toString(); Intrinsics.checkNotNullExpressionValue(stringWriter2, "toString(...)"); return stringWriter2; } public static void addSuppressed(Throwable th, Throwable exception) { Intrinsics.checkNotNullParameter(th, ""); Intrinsics.checkNotNullParameter(exception, "exception"); if (th != exception) { PlatformImplementationsKt.IMPLEMENTATIONS.addSuppressed(th, exception); } } }