[docs]classCapSuleError(Exception):"""Base class for errors raised by :mod:`~qurry.capsule`."""def__init__(self,*message):"""Set the error message."""super().__init__(" ".join(message))self.message=" ".join(message)def__str__(self):"""Return the message."""returnrepr(self.message)
[docs]classCapSuleValuedError(CapSuleError,ValueError):"""ValueErrors raised by :mod:`~qurry.capsule`."""
# General Warning
[docs]classCapSuleWarning(Warning):"""Base class for warning raised by :mod:`~qurry.capsule`."""def__init__(self,*message):"""Set the error message."""super().__init__(" ".join(message))self.message=" ".join(message)def__str__(self):"""Return the message."""returnrepr(self.message)
[docs]classTagListTakeNotIterableWarning(CapSuleWarning):"""Warning raised when the input of :meth:`~qurry.capsule.mori.taglist.TagList.take` is not iterable."""