UsageError

open class UsageError : CliktError

An internal exception that signals a usage error.

The option and argument properties are used in message formatting, and can be set after the exception is created. If this is thrown inside a call to convert, the argument or option value will be set automatically

Constructors

UsageError
Link copied to clipboard
common
fun UsageError(text: String, paramName: String? = null, context: Context? = null, statusCode: Int = 1)
UsageError
Link copied to clipboard
common
fun UsageError(text: String, argument: Argument, context: Context? = null, statusCode: Int = 1)
UsageError
Link copied to clipboard
common
fun UsageError(text: String, option: Option, context: Context? = null, statusCode: Int = 1)

Functions

helpMessage
Link copied to clipboard
common
fun helpMessage(): String

Properties

argument
Link copied to clipboard
common
var argument: Argument? = null
The argument that caused this error.
cause
Link copied to clipboard
common
open val cause: Throwable?
context
Link copied to clipboard
common
var context: Context? = null
message
Link copied to clipboard
common
open override val message: String?
option
Link copied to clipboard
common
var option: Option? = null
The option that caused this error.
paramName
Link copied to clipboard
common
var paramName: String? = null
The name of the parameter that caused the error.
statusCode
Link copied to clipboard
common
val statusCode: Int = 1
The value to use as the exit code for the process.
text
Link copied to clipboard
common
val text: String? = null
Extra text to add to the message.

Inheritors

BadParameterValue
Link copied to clipboard
MissingOption
Link copied to clipboard
MissingArgument
Link copied to clipboard
NoSuchParameter
Link copied to clipboard
IncorrectOptionValueCount
Link copied to clipboard
IncorrectArgumentValueCount
Link copied to clipboard
MutuallyExclusiveGroupException
Link copied to clipboard
FileNotFound
Link copied to clipboard
InvalidFileFormat
Link copied to clipboard