All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dev.forkhandles.bunting.BuntingException.kt Maven / Gradle / Ivy

There is a newer version: 2.20.0.0
Show newest version
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