Debugger: Support captured values (KT-30740)
This commit is contained in:
@@ -33,6 +33,14 @@ fun ReferenceType.safeSourceName(): String? {
|
||||
return wrapAbsentInformationException { sourceName() }
|
||||
}
|
||||
|
||||
fun ReferenceType.safeFields(): List<Field> {
|
||||
return try {
|
||||
fields()
|
||||
} catch (e: ClassNotPreparedException) {
|
||||
emptyList()
|
||||
}
|
||||
}
|
||||
|
||||
fun Method.safeLocationsOfLine(line: Int): List<Location> {
|
||||
return wrapAbsentInformationException { locationsOfLine(line) } ?: emptyList()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user