MissingArgument

class MissingArgument(var argument: Argument, var context: Context? = null) : UsageError

A required argument was not provided

Constructors

Link copied to clipboard
fun MissingArgument(argument: Argument, context: Context? = null)

Functions

Link copied to clipboard

Properties

Link copied to clipboard
var argument: Argument? = null

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

Link copied to clipboard
open val cause: Throwable?
Link copied to clipboard
var context: Context? = null
Link copied to clipboard
open override val message: String?
Link copied to clipboard
var option: Option? = null

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

Link copied to clipboard
var paramName: String? = null

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.

Link copied to clipboard
val statusCode: Int = 1

The value to use as the exit code for the process. If you use CliktCommand.main, it will pass this value to exitProcess after printing message. Defaults to 1.

Link copied to clipboard
val text: String? = null

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