U
    Ò­Òc  ã                   @   sj   d Z G dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG d	d
„ d
eƒZG dd„ deeƒZdS )z?
Defines exceptions that are thrown by the Google Maps client.
c                   @   s"   e Zd ZdZddd„Zdd„ ZdS )ÚApiErrorz3Represents an exception returned by the remote API.Nc                 C   s   || _ || _d S ©N)ÚstatusÚmessage)Úselfr   r   © r   úR/home/ubuntu/graampay/app_env/lib/python3.8/site-packages/googlemaps/exceptions.pyÚ__init__   s    zApiError.__init__c                 C   s(   | j d krt| jƒS d| j| j f S d S )Nz%s (%s))r   Ústrr   ©r   r   r   r   Ú__str__   s    

zApiError.__str__)N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r      s   
r   c                   @   s"   e Zd ZdZddd„Zdd„ ZdS )ÚTransportErrorz9Something went wrong while trying to execute the request.Nc                 C   s
   || _ d S r   )Úbase_exception)r   r   r   r   r   r   %   s    zTransportError.__init__c                 C   s   | j rt| j ƒS dS )NzAn unknown error occurred.)r   r	   r
   r   r   r   r   (   s    
zTransportError.__str__)Nr   r   r   r   r   r   "   s   
r   c                   @   s    e Zd ZdZdd„ Zdd„ ZdS )Ú	HTTPErrorz"An unexpected HTTP error occurred.c                 C   s
   || _ d S r   ©Ústatus_code)r   r   r   r   r   r   0   s    zHTTPError.__init__c                 C   s
   d| j  S )NzHTTP Error: %dr   r
   r   r   r   r   3   s    zHTTPError.__str__Nr   r   r   r   r   r   .   s   r   c                   @   s   e Zd ZdZdS )ÚTimeoutzThe request timed out.N©r   r   r   r   r   r   r   r   r   6   s   r   c                   @   s   e Zd ZdZdS )Ú_RetriableRequestz*Signifies that the request can be retried.Nr   r   r   r   r   r   :   s   r   c                   @   s   e Zd ZdZdS )Ú_OverQueryLimitzæSignifies that the request failed because the client exceeded its query rate limit.

    Normally we treat this as a retriable condition, but we allow the calling code to specify that these requests should
    not be retried.
    Nr   r   r   r   r   r   >   s   r   N)r   Ú	Exceptionr   r   r   r   r   r   r   r   r   r   Ú<module>   s   