From 0f15dfdfdc16af61d9d49450bc3fbdc5060f7c4f Mon Sep 17 00:00:00 2001 From: Yan Zhulanow Date: Thu, 24 May 2018 00:03:14 +0300 Subject: [PATCH] Handle AbsentInformationException correctly (EA-119717) --- .../org/jetbrains/kotlin/idea/debugger/debuggerUtil.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/debuggerUtil.kt b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/debuggerUtil.kt index 59c54af0d25..4897b0a73c8 100644 --- a/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/debuggerUtil.kt +++ b/idea/idea-jvm/src/org/jetbrains/kotlin/idea/debugger/debuggerUtil.kt @@ -176,7 +176,13 @@ fun isOnSuspendReturnOrReenter(location: Location): Boolean { } fun isLastLineLocationInMethod(location: Location): Boolean { - val knownLines = location.method().allLineLocations().map { it.lineNumber() }.filter { it != -1 } + val allLineLocations = try { + location.method().allLineLocations() + } catch (e: AbsentInformationException) { + return false + } + + val knownLines = allLineLocations.map { it.lineNumber() }.filter { it != -1 } if (knownLines.isEmpty()) { return false }