21 lines
689 B
Python
Raw Normal View History

2021-01-29 16:05:22 +01:00
from click import ClickException
class RuleNotFoundError(ClickException):
def __init__(self, id):
super().__init__(f'No rule has ID {id}')
2021-02-16 21:21:46 +01:00
class InvalidArgumentError(ClickException):
2021-02-16 21:21:46 +01:00
'''Exception raised when an invalid argument is given to a CLI command.'''
def __init__(self, message):
super().__init__(message)
class GitError(ClickException):
'''Exception raised when some error happened with git commands.'''
def __init__(self, message):
super().__init__(message)
class RuleValidationError(ClickException):
'''Exception raised when a rule did not pass validation.'''
2021-02-16 21:21:46 +01:00
def __init__(self, message):
super().__init__(message)