jsAndWasmSharedMain.dev.programadorthi.routing.statuspages.StatusPagesUtilsJs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of status-pages Show documentation
Show all versions of status-pages Show documentation
An extensible and multiplatform routing system powered by Ktor
The newest version!
/*
* Copyright 2014-2022 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
*/
package dev.programadorthi.routing.statuspages
import kotlin.reflect.KClass
internal actual fun selectNearestParentClass(
cause: Throwable,
keys: List>,
): KClass<*>? {
if (keys.firstOrNull { cause::class == it } != null) return cause::class
return keys.last()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy