dev.forkhandles.bunting.BuntingException.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bunting4k Show documentation
Show all versions of bunting4k Show documentation
ForkHandles CLI Flag library
package dev.forkhandles.bunting
import kotlin.reflect.KProperty
sealed class BuntingException(message: String, cause: Throwable? = null) : RuntimeException(message, cause)
class Help(message: String) : BuntingException(message)
class MissingFlag(property: KProperty<*>) : BuntingException("Missing --${property.name} (${property.typeDescription()}) flag. Use --help for docs.")
class UnknownCommand(value: String) : BuntingException("Unknown command $value. Use --help for docs.")
class IllegalFlag(property: KProperty<*>, value: String, cause: Throwable) :
BuntingException("Illegal --${property.name} (${property.typeDescription().removeSuffix("?")}) flag: $value. Use --help for docs.", cause)
© 2015 - 2025 Weber Informatics LLC | Privacy Policy