[coroutine] running coroutine stack frame merged with coroutine info
This commit is contained in:
committed by
Vladimir Ilmov
parent
f1669e2230
commit
e4d157c126
+12
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user