[coroutine] running coroutine stack frame merged with coroutine info

This commit is contained in:
Vladimir Ilmov
2020-01-26 15:21:25 +01:00
committed by Vladimir Ilmov
parent f1669e2230
commit e4d157c126
12 changed files with 190 additions and 278 deletions
@@ -89,6 +89,10 @@ fun Field.safeType(): Type? {
return wrapClassNotLoadedException { type() }
}
fun Method.safeSignature() {
wrapIllegalArgumentExceptionException { signature() }
}
private inline fun <T> wrapAbsentInformationException(block: () -> T): T? {
return try {
block()
@@ -101,6 +105,14 @@ private inline fun <T> wrapAbsentInformationException(block: () -> T): T? {
}
}
private inline fun <T> wrapIllegalArgumentExceptionException(block: () -> T): T? {
return try {
block()
} catch (e: IllegalArgumentException) {
null
}
}
private inline fun <T> wrapClassNotLoadedException(block: () -> T): T? {
return try {
block()