Added better exceptions

This commit is contained in:
2021-07-27 09:41:51 +02:00
parent e0b7728719
commit 5e5d86cf94
11 changed files with 99 additions and 20 deletions

View File

@@ -1,3 +1,20 @@
from enum import Enum
# models
class ExceptionArgument(Enum):
list = 'list'
func = 'func'
type = 'type'
# exceptions
class ArgumentNoneException(Exception):
def __init__(self, arg: ExceptionArgument):
Exception.__init__(self, f'Argument {arg} is None')
class InvalidTypeException(Exception):
pass