"""
Custom exceptions for pimsg.
"""


class ImsgError(Exception):
    """Base exception for all pimsg errors."""
    pass


class ImsgConnectionError(ImsgError):
    """Raised when the imsg subprocess cannot be started or is unreachable."""
    pass


class ImsgNotFoundError(ImsgError):
    """Raised when a requested resource (chat, message) is not found."""
    pass


class ImsgSendError(ImsgError):
    """Raised when sending a message fails."""
    pass


class ImsgConfigurationError(ImsgError):
    """Raised when pimsg is misconfigured (e.g. imsg binary not found)."""
    pass
