class DbusClientError(Exception):
    """
    Base error for all D-Bus client operations
    """

    pass


class DbusMethodNotFound(DbusClientError, LookupError):
    """
    Requested D-Bus method does not exist on the interface
    """

    pass


class DbusAccessDenied(DbusClientError, PermissionError):
    """
    Operation denied by polkit or the target service
    """

    pass


class DbusTimeout(DbusClientError, TimeoutError):
    """
    D-Bus call exceeded the configured timeout
    """

    pass


class DbusDisconnected(DbusClientError, ConnectionError):
    """
    Bus disconnected or the service did not reply
    """

    pass


class DbusCallError(DbusClientError):
    """
    Non-specific D-Bus error during a call

    :param message: human-readable error message
    :param name: optional D-Bus error name (e.g., org.freedesktop.DBus.Error.Failed)
    """

    def __init__(self, message: str, name: str | None = None):
        super().__init__(message)
        self.name = name