2021-01-29 16:05:22 +01:00
|
|
|
from click import ClickException
|
|
|
|
|
2021-02-16 21:21:46 +01:00
|
|
|
|
2021-06-10 11:03:05 +02:00
|
|
|
class InvalidArgumentError(ClickException):
|
2021-02-16 21:21:46 +01:00
|
|
|
'''Exception raised when an invalid argument is given to a CLI command.'''
|
2021-02-18 12:50:55 +01:00
|
|
|
|
2021-02-23 20:41:11 +01:00
|
|
|
def __init__(self, message):
|
|
|
|
super().__init__(message)
|
|
|
|
|
2022-02-24 17:09:07 +01:00
|
|
|
|
2021-02-23 20:41:11 +01:00
|
|
|
class RuleValidationError(ClickException):
|
|
|
|
'''Exception raised when a rule did not pass validation.'''
|
2022-02-24 17:09:07 +01:00
|
|
|
|
2021-02-16 21:21:46 +01:00
|
|
|
def __init__(self, message):
|
2021-06-10 11:03:05 +02:00
|
|
|
super().__init__(message)
|
2022-03-08 04:26:53 -08:00
|
|
|
|
|
|
|
class RuleNotFoundError(ClickException):
|
|
|
|
'''Exception raised when a rule does not exist in the repository.'''
|
|
|
|
|
|
|
|
def __init__(self, message):
|
|
|
|
super().__init__(message)
|