Custom Exceptions#
The term_image.exceptions module defines the following:
- exception term_image.exceptions.TermImageWarning#
Bases:
UserWarningPackage-specific warning category.
- exception term_image.exceptions.TermImageError#
Bases:
ExceptionException baseclass. Raised for generic errors.
- exception term_image.exceptions.URLNotFoundError#
Bases:
FileNotFoundError,term_image.exceptions.TermImageErrorRaised for 404 errors.
- exception term_image.exceptions.InvalidSizeError#
Bases:
ValueError,term_image.exceptions.TermImageErrorRaised for invalid image sizes.
- exception term_image.exceptions.StyleError#
Bases:
term_image.exceptions.TermImageErrorBaseclass 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
BaseImagedefined 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#
Bases:
term_image.exceptions.StyleErrorRaised for errors specific to
GraphicsImageand its subclasses defined outside this package.
- exception term_image.exceptions.TextImageError#
Bases:
term_image.exceptions.StyleErrorRaised for errors specific to
TextImageand its subclasses defined outside this package.
- exception term_image.exceptions.BlockImageError#
Bases:
term_image.exceptions.TextImageErrorRaised for errors specific to
BlockImageand its subclasses defined outside this package.
- exception term_image.exceptions.ITerm2ImageError#
Bases:
term_image.exceptions.GraphicsImageErrorRaised for errors specific to
ITerm2Imageand its subclasses defined outside this package.
- exception term_image.exceptions.KittyImageError#
Bases:
term_image.exceptions.GraphicsImageErrorRaised for errors specific to
KittyImageand its subclasses defined outside this package.