Updated docs
This commit is contained in:
@@ -3,37 +3,33 @@ from enum import Enum
|
||||
|
||||
# models
|
||||
class ExceptionArgument(Enum):
|
||||
list = 'list'
|
||||
func = 'func'
|
||||
type = 'type'
|
||||
value = 'value'
|
||||
index = 'index'
|
||||
list = "list"
|
||||
func = "func"
|
||||
type = "type"
|
||||
value = "value"
|
||||
index = "index"
|
||||
|
||||
|
||||
# exceptions
|
||||
class ArgumentNoneException(Exception):
|
||||
r"""Exception when argument is None
|
||||
"""
|
||||
r"""Exception when argument is None"""
|
||||
|
||||
def __init__(self, arg: ExceptionArgument):
|
||||
Exception.__init__(self, f'argument {arg} is None')
|
||||
Exception.__init__(self, f"argument {arg} is None")
|
||||
|
||||
|
||||
class IndexOutOfRangeException(Exception):
|
||||
r"""Exception when index is out of range
|
||||
"""
|
||||
r"""Exception when index is out of range"""
|
||||
|
||||
def __init__(self, err: str = None):
|
||||
Exception.__init__(self, f'List index out of range' if err is None else err)
|
||||
Exception.__init__(self, f"List index out of range" if err is None else err)
|
||||
|
||||
|
||||
class InvalidTypeException(Exception):
|
||||
r"""Exception when type is invalid
|
||||
"""
|
||||
r"""Exception when type is invalid"""
|
||||
pass
|
||||
|
||||
|
||||
class WrongTypeException(Exception):
|
||||
r"""Exception when type is unexpected
|
||||
"""
|
||||
r"""Exception when type is unexpected"""
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user