Errors
Error classes to find errors more accurately.
class Error(Exception)
Generic error.
def __init__(self,
error_type: str = "",
message: str = ""
) -> None
class HTTPError(Error)
The API call returned an error.
def __init__(self,
dic: dict # The caught HTTP error will often be returned as a dict
) -> None
class ImageError(Exception)
Generic error in terms of the avatar image.
def __init__(self,
message: str = None
) -> None
class ImageValueError(ImageError)
The avatar image has a value error.
def __init__(self,
file_name: str = None
) -> None
class ImageOSError(ImageError)
The image cannot be written to your device.
def __init__(self,
message: str = None
) -> None
class PILError(ImageError)
PIL
is not installed or a DAvatar method that uses PIL
raised an unexpected error.
def __init__(self,
message: str = "To use this function you need to install Pillow."
) -> None
class IncorrectColor(Exception)
The color you provided is not in hex format.
def __init__(self,
wrong_color: str = None
) -> None
class InvalidOption(Exception)
The option you provided is not a valid option.
def __init__(self,
wrong_option: str = None
) -> None
def log_error()
Manually log an error either printing the error or raising it.
def log_error(
exception: Union[Exception, str],
raise_error: bool = False
) -> None
Raises: The given
exception
ifraise_error
is set toTrue
Last updated
Was this helpful?