2021-07-27 09:41:51 +02:00
|
|
|
from enum import Enum
|
|
|
|
|
|
|
|
|
|
|
|
# models
|
|
|
|
class ExceptionArgument(Enum):
|
|
|
|
list = 'list'
|
|
|
|
func = 'func'
|
|
|
|
type = 'type'
|
2021-07-27 10:59:24 +02:00
|
|
|
value = 'value'
|
2021-07-27 09:41:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
# exceptions
|
|
|
|
class ArgumentNoneException(Exception):
|
|
|
|
|
|
|
|
def __init__(self, arg: ExceptionArgument):
|
|
|
|
Exception.__init__(self, f'Argument {arg} is None')
|
|
|
|
|
|
|
|
|
2021-07-27 09:26:30 +02:00
|
|
|
class InvalidTypeException(Exception):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class WrongTypeException(Exception):
|
|
|
|
pass
|