Creates a new instance of CancellationError.
What to tell the user, in one calm line.
Optionaloptions: ErrorOptions
Optional additional error options.
Optional ReadonlycauseOptional ReadonlycodeOptional ReadonlymetadataConverts the error to a formatted string representation.
Optionalmultiline: boolean
Determine if output value must be multiline or not.
A formatted error string.
StaticcreateCreate a RuntimeError.
Optionaloptions: ErrorOptions
The options to create a RuntimeError.
A new RuntimeError instance.
Raised when the user deliberately stops a prompt-driven command.
Cancellation travels as an error because it has to unwind the command it interrupts, but it is not a failure: nothing went wrong, the user simply decided not to proceed. Distinguishing it by type is what lets each layer treat it as the successful outcome it is, without matching on a message string, which would break the moment the wording changes or the output is translated.
Extends CliError so anything already handling CLI errors keeps working; handlers that care about the difference test for this type first.