EA-210823: Fix AIE in breakpoint applicability test

This commit is contained in:
Yan Zhulanow
2019-11-14 22:31:48 +09:00
parent ab06f772fc
commit 16c4b0e458
2 changed files with 14 additions and 6 deletions
@@ -62,7 +62,11 @@ fun StackFrameProxy.safeLocation(): Location? {
}
fun Location.safeSourceName(): String? {
return DebuggerUtilsEx.getSourceName(this) { null }
return wrapAbsentInformationException { this.sourceName() }
}
fun Location.safeSourceName(stratum: String): String? {
return wrapAbsentInformationException { this.sourceName(stratum) }
}
fun Location.safeLineNumber(): Int {
@@ -92,6 +96,8 @@ private inline fun <T> wrapAbsentInformationException(block: () -> T): T? {
null
} catch (e: AbsentInformationEvaluateException) {
null
} catch (e: InternalException) {
null
}
}