From e727e209738f7d51d249354c06c128a6c1910658 Mon Sep 17 00:00:00 2001 From: Ilya Chernikov Date: Tue, 8 May 2018 15:59:45 +0200 Subject: [PATCH] [minor] Improve daemon exceptions logging --- .../src/org/jetbrains/kotlin/daemon/CompileServiceImpl.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/compiler/daemon/src/org/jetbrains/kotlin/daemon/CompileServiceImpl.kt b/compiler/daemon/src/org/jetbrains/kotlin/daemon/CompileServiceImpl.kt index b1a5a2d9543..643680fe6dd 100644 --- a/compiler/daemon/src/org/jetbrains/kotlin/daemon/CompileServiceImpl.kt +++ b/compiler/daemon/src/org/jetbrains/kotlin/daemon/CompileServiceImpl.kt @@ -976,7 +976,13 @@ class CompileServiceImpl( } // TODO: consider possibilities to handle OutOfMemory catch (e: Throwable) { - log.info("Error: $e") + log.log( + Level.SEVERE, + "Exception: $e\n ${e.stackTrace.joinToString("\n ")}${ + if (e.cause != null && e.cause != e) { + "\nCaused by: ${e.cause}\n ${e.cause!!.stackTrace.joinToString("\n ")}" + } else "" + }") throw e } }