From 3e2003e60d3f18ebb6963577745276e9a9f49f5b Mon Sep 17 00:00:00 2001 From: Ilya Chernikov Date: Mon, 18 Dec 2017 13:36:33 +0100 Subject: [PATCH] Do not log daemon connection errors as exceptions - may reduce number of ... redundant report if the problem is corrected on retry (cherry picked from commit 260fe36) --- .../src/org/jetbrains/kotlin/daemon/common/ClientUtils.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/ClientUtils.kt b/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/ClientUtils.kt index 7913e392b46..8bf0712a9d5 100644 --- a/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/ClientUtils.kt +++ b/compiler/daemon/daemon-common/src/org/jetbrains/kotlin/daemon/common/ClientUtils.kt @@ -92,13 +92,13 @@ private inline fun tryConnectToDaemon(port: Int, report: (DaemonReportCategory, val daemon = LocateRegistry.getRegistry(LoopbackNetworkInterface.loopbackInetAddressName, port, LoopbackNetworkInterface.clientLoopbackSocketFactory) ?.lookup(COMPILER_SERVICE_RMI_NAME) when (daemon) { - null -> report(DaemonReportCategory.EXCEPTION, "daemon not found") + null -> report(DaemonReportCategory.INFO, "daemon not found") is CompileService -> return daemon - else -> report(DaemonReportCategory.EXCEPTION, "Unable to cast compiler service, actual class received: ${daemon::class.java.name}") + else -> report(DaemonReportCategory.INFO, "Unable to cast compiler service, actual class received: ${daemon::class.java.name}") } } catch (e: Throwable) { - report(DaemonReportCategory.EXCEPTION, "cannot connect to registry: " + (e.cause?.message ?: e.message ?: "unknown error")) + report(DaemonReportCategory.INFO, "cannot connect to registry: " + (e.cause?.message ?: e.message ?: "unknown error")) } return null }