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
UsageError(text: String, paramName: String? = null) UsageError(text: String, argument: Argument) UsageError(text: String, option: Option) |
var argument: Argument?
The argument that caused this error. This may be set after the error is thrown. |
|
open val message: String? |
|
var option: Option?
The option that caused this error. This may be set after the error is thrown. |
|
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. |
|
val text: String?
Extra text to add to the message. Not all subclasses uses this. |
open fun formatMessage(): String |
|
fun helpMessage(context: Context? = null): String |
|
fun inferParamName(): String |
open class BadParameterValue : UsageError
A parameter was given the correct number of values, but of invalid format or type. |
|
open class IncorrectArgumentValueCount : UsageError
An argument was supplied but the number of values supplied was incorrect. |
|
open class IncorrectOptionValueCount : UsageError
An option was supplied but the number of values supplied to the option was incorrect. |
|
open class MissingParameter : UsageError
A required parameter was not provided |
|
open class NoSuchOption : UsageError
An option was provided that does not exist. |