Source code for term_image.exceptions
"""
.. Custom Exceptions
"""
from __future__ import annotations
[docs]class RenderError(TermImageError):
"""Raised for errors that occur **during** :term:`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``.
"""
[docs]class UrwidImageError(TermImageError):
"""Raised for errors specific to :py:class:`~term_image.widget.UrwidImage`."""
__all__ = ["TermImageWarning"] + [
name
for name, obj in vars().items()
if isinstance(obj, type) and issubclass(obj, TermImageError)
]