Added better exceptions
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user