cloup.constraints.exceptions
¶
Functions¶
|
Contents¶
-
exception
cloup.constraints.exceptions.
ConstraintViolated
(message, ctx=None)[source]¶ Bases:
click.UsageError
An internal exception that signals a usage error. This typically aborts any further handling.
- Parameters
message – the error message to display.
ctx – optionally the context that caused this error. Click will fill in the context automatically in some situations.
-
classmethod
default
(cls, params, desc, ctx=None)[source]¶ - Parameters
params (Iterable[click.Parameter]) –
desc (str) –
ctx (Optional[click.Context]) –
- Return type
-
exception
cloup.constraints.exceptions.
UnsatisfiableConstraint
(constraint, params, reason)[source]¶ Bases:
Exception
Raised if a constraint cannot be satisfied by a group of parameters independently from their values at runtime; e.g. mutually_exclusive cannot be satisfied if multiple of the parameters are required.