Errors

Error classes to find errors more accurately.

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(Exceptionarrow-up-right)

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.

class ImageOSError(ImageError)

The image cannot be written to your device.

class PILError(ImageError)

PIL is not installed or a DAvatar method that uses PIL raised an unexpected error.

class IncorrectColor(Exceptionarrow-up-right)

The color you provided is not in hex format.

class InvalidOption(Exceptionarrow-up-right)

The option you provided is not a valid option.

def log_error()

Manually log an error either printing the error or raising it.

Raises: The given exception if raise_error is set to True

Last updated