Skip to content
Back to top
View this page

# `exceptions` Module

exception term_image.exceptions.TermImageWarning

  Bases: `UserWarning`

  Package-specific warning category.

exception term_image.exceptions.TermImageError

  Bases: `Exception`

  Exception baseclass. Raised for generic errors.

exception term_image.exceptions.InvalidSizeError

  Bases: `term_image.exceptions.TermImageError`

  Raised for invalid image sizes.

exception term_image.exceptions.RenderError

  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

  Bases: `term_image.exceptions.TermImageError`

  Raised for errors pertaining to the Style API.

exception term_image.exceptions.URLNotFoundError

  Bases: `term_image.exceptions.TermImageError`, `FileNotFoundError`

  Raised for 404 errors.

exception term_image.exceptions.UrwidImageError

  Bases: `term_image.exceptions.TermImageError`

  Raised for errors specific to `UrwidImage`.