exceptions Module#

Warnings:

TermImageWarning

Package-specific warning category.

Exceptions:

TermImageError

Exception baseclass.

InvalidSizeError

Raised for invalid image sizes.

RenderError

Raised for errors that occur during rendering.

StyleError

Raised for errors pertaining to the Style API.

URLNotFoundError

Raised for 404 errors.

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.InvalidSizeError[source]#

Bases: term_image.exceptions.TermImageError

Raised for invalid image sizes.

exception term_image.exceptions.RenderError[source]#

Bases: term_image.exceptions.TermImageError

Raised for errors that occur during rendering.

If the direct cause of the error is an exception, it should typically be attached as the context of this exception i.e raise RenderError(...) from exc.

exception term_image.exceptions.StyleError[source]#

Bases: term_image.exceptions.TermImageError

Raised for errors pertaining to the Style API.

exception term_image.exceptions.URLNotFoundError[source]#

Bases: term_image.exceptions.TermImageError, FileNotFoundError

Raised for 404 errors.

exception term_image.exceptions.UrwidImageError[source]#

Bases: term_image.exceptions.TermImageError

Raised for errors specific to UrwidImage.