[docs]classMemcachioConnectionError(ConnectionError):""" Base exception for any connection errors encountered. """#: The memcached server where the connection error originated fromendpoint:SingleMemcachedInstanceEndpointdef__init__(self,message:str,endpoint:SingleMemcachedInstanceEndpoint):self.endpoint=endpointsuper().__init__(f"{messageor'Connection error'} (memcached server: {endpoint})")
[docs]classConnectionNotAvailable(MemcachioConnectionError):""" Raised when a connection couldn't be acquired from the pool within the configured timeout """def__init__(self,endpoint:SingleMemcachedInstanceEndpoint,timeout:float):message=f"Unable to get a connection from the pool in {timeout} seconds"super().__init__(message,endpoint=endpoint)
[docs]classNoAvailableNodes(ValueError):""" Raised when no nodes are available in the cluster """pass
[docs]classAutoDiscoveryError(MemcachedError):""" Raised when the response for autodiscovery is invalid """pass