From 88206ca1510265a524b83346ff61f0a9b8cca2a5 Mon Sep 17 00:00:00 2001 From: Dmitriy Novozhilov Date: Tue, 27 Feb 2024 10:14:21 +0200 Subject: [PATCH] [Util] Allow to use Throwable as cause of ExceptionWithAttachment --- .../kotlin/utils/exceptions/ExceptionAttachmentBuilder.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/util/src/org/jetbrains/kotlin/utils/exceptions/ExceptionAttachmentBuilder.kt b/compiler/util/src/org/jetbrains/kotlin/utils/exceptions/ExceptionAttachmentBuilder.kt index 394ee0529e4..f8259d349b2 100644 --- a/compiler/util/src/org/jetbrains/kotlin/utils/exceptions/ExceptionAttachmentBuilder.kt +++ b/compiler/util/src/org/jetbrains/kotlin/utils/exceptions/ExceptionAttachmentBuilder.kt @@ -60,7 +60,7 @@ inline fun KotlinExceptionWithAttachments.buildAttachment( inline fun Logger.logErrorWithAttachment( message: String, - cause: Exception? = null, + cause: Throwable? = null, attachmentName: String = "info.txt", buildAttachment: ExceptionAttachmentBuilder.() -> Unit = {}, ) { @@ -69,7 +69,7 @@ inline fun Logger.logErrorWithAttachment( inline fun buildErrorWithAttachment( message: String, - cause: Exception? = null, + cause: Throwable? = null, attachmentName: String = "info.txt", buildAttachment: ExceptionAttachmentBuilder.() -> Unit = {}, ): Throwable { @@ -80,7 +80,7 @@ inline fun buildErrorWithAttachment( inline fun errorWithAttachment( message: String, - cause: Exception? = null, + cause: Throwable? = null, attachmentName: String = "info.txt", buildAttachment: ExceptionAttachmentBuilder.() -> Unit = {}, ): Nothing {