clikt / com.github.ajalt.clikt.core / NoSuchOption

NoSuchOption

open class NoSuchOption : UsageError

An option was provided that does not exist.

Constructors

<init>

NoSuchOption(givenName: String, possibilities: List<String> = emptyList())

An option was provided that does not exist.

Properties

givenName

val givenName: String

possibilities

val possibilities: List<String>

Inherited Properties

argument

var argument: Argument?

The argument that caused this error. This may be set after the error is thrown.

message

open val message: String?

option

var option: Option?

The option that caused this error. This may be set after the error is thrown.

paramName

var paramName: String?

The name of the parameter that caused the error. If possible, this should be set to the actual name used. If not set, it will be inferred from argument or option if either is set.

text

val text: String?

Extra text to add to the message. Not all subclasses uses this.

Functions

formatMessage

open fun formatMessage(): String

Inherited Functions

helpMessage

fun helpMessage(context: Context? = null): String

inferParamName

fun inferParamName(): String