diff --git a/rd-kt/rd-core/src/main/kotlin/com/jetbrains/rd/util/Logger.kt b/rd-kt/rd-core/src/main/kotlin/com/jetbrains/rd/util/Logger.kt index 643fed36c..5245e0883 100644 --- a/rd-kt/rd-core/src/main/kotlin/com/jetbrains/rd/util/Logger.kt +++ b/rd-kt/rd-core/src/main/kotlin/com/jetbrains/rd/util/Logger.kt @@ -116,7 +116,11 @@ object RdDefaultErrorLoggerHolder { inline fun Logger.catch(comment: String?, action:() -> Unit) { try { action() - } catch (e : Throwable) { + } + catch (ce: CancellationException) { + throw ce + } + catch (e : Throwable) { val sfx = "${e.javaClass.name} ${e.message}" + if (comment.isNullOrBlank()) "" else " ($comment)" error("Catch $sfx", e) }