com.ancientlightstudios.quarkus.kotlin.openapi.utils.ProbableBug.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-kotlin-openapi-maven-plugin Show documentation
Show all versions of quarkus-kotlin-openapi-maven-plugin Show documentation
A Maven plugin to use the OpenAPI generator.
package com.ancientlightstudios.quarkus.kotlin.openapi.utils
@Suppress("FunctionName")
fun ProbableBug(reason: String): Nothing {
val location = IllegalArgumentException().stackTrace
.drop(1).firstOrNull()
?.run { "$fileName:$lineNumber" }
?: "unknown location"
throw IllegalStateException("Bug detected ($location): $reason")
}