exceptions Module#

Warnings:

TermImageWarning

Package-specific warning category.

Exceptions:

TermImageError

Exception baseclass.

URLNotFoundError

Raised for 404 errors.

InvalidSizeError

Raised for invalid image sizes.

StyleError

Baseclass of style-specific exceptions.

GraphicsImageError

Raised for errors specific to GraphicsImage and its subclasses defined outside this package.

TextImageError

Raised for errors specific to TextImage and its subclasses defined outside this package.

BlockImageError

Raised for errors specific to BlockImage and its subclasses defined outside this package.

ITerm2ImageError

Raised for errors specific to ITerm2Image and its subclasses defined outside this package.

KittyImageError

Raised for errors specific to KittyImage and its subclasses defined outside this package.

UrwidImageError

Raised for errors specific to UrwidImage.

exception term_image.exceptions.TermImageWarning[source]#

Bases: UserWarning

Package-specific warning category.

exception term_image.exceptions.TermImageError[source]#

Bases: Exception

Exception baseclass. Raised for generic errors.

exception term_image.exceptions.URLNotFoundError[source]#

Bases: FileNotFoundError, term_image.exceptions.TermImageError

Raised for 404 errors.

exception term_image.exceptions.InvalidSizeError[source]#

Bases: ValueError, term_image.exceptions.TermImageError

Raised for invalid image sizes.

exception term_image.exceptions.StyleError[source]#

Bases: term_image.exceptions.TermImageError

Baseclass of style-specific exceptions.

Never raised for errors pertaining to image classes defined in this package. Instead, the exception subclass specific to each image class is raised.

Only raised for subclasses of BaseImage defined outside this package (which are not subclasses of any other image class defined in this package).

Being the baseclass of all style-specific exceptions, it can be used be used to handle any style-specific error, regardless of the render style it originated from.

exception term_image.exceptions.GraphicsImageError[source]#

Bases: term_image.exceptions.StyleError

Raised for errors specific to GraphicsImage and its subclasses defined outside this package.

exception term_image.exceptions.TextImageError[source]#

Bases: term_image.exceptions.StyleError

Raised for errors specific to TextImage and its subclasses defined outside this package.

exception term_image.exceptions.BlockImageError[source]#

Bases: term_image.exceptions.TextImageError

Raised for errors specific to BlockImage and its subclasses defined outside this package.

exception term_image.exceptions.ITerm2ImageError[source]#

Bases: term_image.exceptions.GraphicsImageError

Raised for errors specific to ITerm2Image and its subclasses defined outside this package.

exception term_image.exceptions.KittyImageError[source]#

Bases: term_image.exceptions.GraphicsImageError

Raised for errors specific to KittyImage and its subclasses defined outside this package.

exception term_image.exceptions.UrwidImageError[source]#

Bases: term_image.exceptions.TermImageError

Raised for errors specific to UrwidImage.