cleaned up stacktraces

This commit is contained in:
Robinson 2022-04-04 23:05:50 +02:00
parent 82fb4c4151
commit 217d1c3b19
No known key found for this signature in database
GPG Key ID: 8E7DB78588BD6F5C

View File

@ -115,10 +115,11 @@ internal class ListenerManager<CONNECTION: Connection>(private val logger: KLogg
throwable.stackTrace = stackTrace.filterIndexed { index, element ->
val stackName = element.className
if (index <= firstDorkboxIndex && index >= lastDorkboxIndex) {
true
false
} else {
!(stackName.startsWith("kotlinx.coroutines.") ||
val isCoroutine = !(stackName.startsWith("kotlinx.coroutines.") ||
stackName.startsWith("kotlin.coroutines."))
isCoroutine && element.methodName != "invokeSuspend"
}
}.toTypedArray()
}